2019-05-01 17:36:46 +00:00
|
|
|
tool
|
|
|
|
extends Spatial
|
|
|
|
|
|
|
|
export( Color ) var color = Color( 1.0, 1.0, 1.0, 1.0 ) setget set_color
|
|
|
|
func set_color( value ):
|
2021-07-10 16:44:53 +00:00
|
|
|
color = value
|
|
|
|
$container_bottom/container_bottom.get_surface_material( 0 ).albedo_color = self.color
|
|
|
|
$container_lid/container_lid.get_surface_material( 0 ).albedo_color = self.color
|
2019-05-01 17:36:46 +00:00
|
|
|
|
2021-07-10 16:44:53 +00:00
|
|
|
export( Color ) var color2 = Color( 1.0, 1.0, 1.0, 1.0 ) setget set_color2
|
|
|
|
func set_color2( value ):
|
|
|
|
color2 = value
|
|
|
|
$container_bottom/container_bottom.get_surface_material( 1 ).albedo_color = self.color2
|
|
|
|
$container_lid/container_lid.get_surface_material( 1 ).albedo_color = self.color2
|
2019-05-01 17:36:46 +00:00
|
|
|
|
|
|
|
export( float ) var lid_angle = 0.0 setget set_lid_angle
|
|
|
|
func set_lid_angle( value ):
|
2021-07-10 16:44:53 +00:00
|
|
|
if value < 0.0 or value > 100.0:
|
|
|
|
return
|
|
|
|
lid_angle = value
|
|
|
|
$container_lid.rotation_degrees = Vector3( -lid_angle, 0.0, 0.0 )
|