Colors
This commit is contained in:
parent
d520e5f67e
commit
a425f62267
9 changed files with 25 additions and 6 deletions
|
|
@ -10,4 +10,5 @@ melting_point = 300.0
|
|||
boiling_point = 520.0
|
||||
color = Color(1, 0.26666665, 0, 1)
|
||||
prefer_scientific_name = true
|
||||
is_solution = true
|
||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||
|
|
|
|||
|
|
@ -10,4 +10,5 @@ melting_point = 278.0
|
|||
boiling_point = 557.8
|
||||
color = Color(1, 1, 1, 0.43529412)
|
||||
prefer_scientific_name = true
|
||||
is_solution = true
|
||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||
|
|
|
|||
|
|
@ -36,4 +36,5 @@ drag_camera={
|
|||
|
||||
[rendering]
|
||||
|
||||
renderer/rendering_method="mobile"
|
||||
renderer/rendering_method="gl_compatibility"
|
||||
renderer/rendering_method.mobile="gl_compatibility"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=11 format=3 uid="uid://bjxjcx2qu16q5"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://bjxjcx2qu16q5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bjnv2g1ni0525" path="res://src/drag/draggable_object.gd" id="1_0xufn"]
|
||||
[ext_resource type="PackedScene" uid="uid://b6ydpkle2ol20" path="res://assets/models/FlaskNew.glb" id="2_h7awq"]
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
[ext_resource type="Script" uid="uid://ctu7escah5lo1" path="res://src/interactible/interaction_source.gd" id="4_kkw7a"]
|
||||
[ext_resource type="Script" uid="uid://e8xu57ewvb5a" path="res://src/interactible/proximity_rotator.gd" id="5_rqua0"]
|
||||
[ext_resource type="Script" uid="uid://dteb2xxl8gixp" path="res://src/ui/slider_display.gd" id="6_wadb5"]
|
||||
[ext_resource type="Script" uid="uid://82ettbegollp" path="res://src/inventory.gd" id="7_h7awq"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_vcwhe"]
|
||||
radius = 0.1
|
||||
|
|
@ -86,6 +87,12 @@ suffix = "%"
|
|||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Inventory" type="Node" parent="."]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("7_h7awq")
|
||||
open_on_top = true
|
||||
metadata/_custom_type_script = "uid://82ettbegollp"
|
||||
|
||||
[connection signal="drag_ended" from="." to="InteractionArea" method="request_interaction"]
|
||||
[connection signal="interaction_reciever_entered" from="InteractionArea" to="ProximityRotator" method="_on_interaction_area_interaction_reciever_entered"]
|
||||
[connection signal="interaction_reciever_exited" from="InteractionArea" to="ProximityRotator" method="_on_interaction_area_interaction_reciever_exited"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
extends Node
|
||||
|
||||
class_name Inventory
|
||||
|
||||
@export var open_on_top: bool
|
||||
var liquids
|
||||
var solids
|
||||
var gasses
|
||||
var inventory: Array[RuntimeSubstanceData]
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ class_name Substance
|
|||
@export var boiling_point: float
|
||||
@export var color: Color
|
||||
@export var prefer_scientific_name: bool
|
||||
@export var is_solution: bool
|
||||
|
||||
func get_formula() -> StringName:
|
||||
return scientific_name if prefer_scientific_name else formula
|
||||
|
|
|
|||
7
src/runtime_substance_data.gd
Normal file
7
src/runtime_substance_data.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends RefCounted
|
||||
|
||||
class_name RuntimeSubstanceData
|
||||
|
||||
var substance: Substance
|
||||
var amount: float
|
||||
var temperature: float = 20.0
|
||||
1
src/runtime_substance_data.gd.uid
Normal file
1
src/runtime_substance_data.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://coq5iah4er0lc
|
||||
|
|
@ -7,5 +7,5 @@ func _ready() -> void:
|
|||
if substance:
|
||||
var jar_fill_material = $"../JarFill".material_override
|
||||
jar_fill_material.albedo_color = substance.color
|
||||
if substance.melting_point > 20:
|
||||
if substance.melting_point > 20 and not substance.is_solution:
|
||||
jar_fill_material.albedo_texture = preload("res://assets/textures/solid.png")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue