diff --git a/meshes/props/travel_box/container.gd b/meshes/props/travel_box/container.gd index e9b5114..e18c5b9 100644 --- a/meshes/props/travel_box/container.gd +++ b/meshes/props/travel_box/container.gd @@ -3,12 +3,19 @@ extends Spatial export( Color ) var color = Color( 1.0, 1.0, 1.0, 1.0 ) setget set_color func set_color( value ): - 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 + 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 +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 export( float ) var lid_angle = 0.0 setget set_lid_angle func set_lid_angle( value ): - lid_angle = value - $container_lid.rotation_degrees = Vector3( -lid_angle, 0.0, 0.0 ) \ No newline at end of file + if value < 0.0 or value > 100.0: + return + lid_angle = value + $container_lid.rotation_degrees = Vector3( -lid_angle, 0.0, 0.0 ) diff --git a/meshes/props/travel_box/container.tscn b/meshes/props/travel_box/container.tscn index 21d0ab0..f35cece 100644 --- a/meshes/props/travel_box/container.tscn +++ b/meshes/props/travel_box/container.tscn @@ -6,6 +6,8 @@ [node name="container" type="Spatial"] script = ExtResource( 3 ) +color = Color( 0.0352941, 0.0431373, 0.0627451, 1 ) +color2 = Color( 0.168627, 0.172549, 0.211765, 1 ) [node name="container_bottom" parent="." instance=ExtResource( 1 )] diff --git a/meshes/props/travel_box/container_lid.tscn b/meshes/props/travel_box/container_lid.tscn index 45e39c7..8790d19 100644 --- a/meshes/props/travel_box/container_lid.tscn +++ b/meshes/props/travel_box/container_lid.tscn @@ -5,7 +5,7 @@ [ext_resource path="res://materials/tilables/base_plastic_hard_shiny.material" type="Material" id=3] [ext_resource path="res://materials/tilables/base_steel_glossy.material" type="Material" id=4] -[node name="container_lid" instance=ExtResource( 1 )] +[node name="container_lid" index="0" instance=ExtResource( 1 )] [node name="container_lid" parent="." index="0"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )