Browse Source

Continuing to build out the UI

master
Bryan Miller 4 years ago
parent
commit
ea755dd9cb
15 changed files with 216 additions and 40 deletions
  1. +3
    -0
      .import/Progress_Back_H.png-154c341c3b0b1e63c366c566a4ad3d43.md5
  2. BIN
      .import/Progress_Back_H.png-154c341c3b0b1e63c366c566a4ad3d43.stex
  3. +3
    -0
      .import/Progress_Bar_H.png-d6e07a97ba5a7e6f00f81b602acc33f2.md5
  4. BIN
      .import/Progress_Bar_H.png-d6e07a97ba5a7e6f00f81b602acc33f2.stex
  5. +8
    -0
      Data/Fonts/Hydrogen_64.tres
  6. +9
    -0
      Data/Fonts/Killer_Robot_20.tres
  7. BIN
      Data/Fonts/Robot Killer.ttf
  8. BIN
      Data/Fonts/hydroge2.ttf
  9. BIN
      Data/Graphics/UI/Progress_Back_H.png
  10. +34
    -0
      Data/Graphics/UI/Progress_Back_H.png.import
  11. BIN
      Data/Graphics/UI/Progress_Bar_H.png
  12. +34
    -0
      Data/Graphics/UI/Progress_Bar_H.png.import
  13. +103
    -30
      Data/Scenes/World.tscn
  14. +11
    -9
      Data/Scripts/Controller.gd
  15. +11
    -1
      Data/Scripts/UI/GUI.gd

+ 3
- 0
.import/Progress_Back_H.png-154c341c3b0b1e63c366c566a4ad3d43.md5 View File

source_md5="2a74bea5155f01c1f2c885275f294847"
dest_md5="8d137aaf639aa92772a4b79eb90cb60a"


BIN
.import/Progress_Back_H.png-154c341c3b0b1e63c366c566a4ad3d43.stex View File


+ 3
- 0
.import/Progress_Bar_H.png-d6e07a97ba5a7e6f00f81b602acc33f2.md5 View File

source_md5="c9986d12b675cea6a80493423d5d121a"
dest_md5="8c1cfa8cac7f2b7e48185138386d3b20"


BIN
.import/Progress_Bar_H.png-d6e07a97ba5a7e6f00f81b602acc33f2.stex View File


+ 8
- 0
Data/Fonts/Hydrogen_64.tres View File

[gd_resource type="DynamicFont" load_steps=2 format=2]

[ext_resource path="res://Data/Fonts/hydroge2.ttf" type="DynamicFontData" id=1]

[resource]
size = 64
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 1 )

+ 9
- 0
Data/Fonts/Killer_Robot_20.tres View File

[gd_resource type="DynamicFont" load_steps=2 format=2]

[ext_resource path="res://Data/Fonts/Robot Killer.ttf" type="DynamicFontData" id=1]

[resource]
size = 20
outline_size = 1
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 1 )

BIN
Data/Fonts/Robot Killer.ttf View File


BIN
Data/Fonts/hydroge2.ttf View File


BIN
Data/Graphics/UI/Progress_Back_H.png View File

Before After
Width: 24  |  Height: 118  |  Size: 282B

+ 34
- 0
Data/Graphics/UI/Progress_Back_H.png.import View File

[remap]

importer="texture"
type="StreamTexture"
path="res://.import/Progress_Back_H.png-154c341c3b0b1e63c366c566a4ad3d43.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Data/Graphics/UI/Progress_Back_H.png"
dest_files=[ "res://.import/Progress_Back_H.png-154c341c3b0b1e63c366c566a4ad3d43.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

BIN
Data/Graphics/UI/Progress_Bar_H.png View File

Before After
Width: 24  |  Height: 118  |  Size: 180B

+ 34
- 0
Data/Graphics/UI/Progress_Bar_H.png.import View File

[remap]

importer="texture"
type="StreamTexture"
path="res://.import/Progress_Bar_H.png-d6e07a97ba5a7e6f00f81b602acc33f2.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Data/Graphics/UI/Progress_Bar_H.png"
dest_files=[ "res://.import/Progress_Bar_H.png-d6e07a97ba5a7e6f00f81b602acc33f2.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

+ 103
- 30
Data/Scenes/World.tscn View File

[gd_scene load_steps=13 format=2]
[gd_scene load_steps=17 format=2]


[ext_resource path="res://Data/Objects/Pusher.tscn" type="PackedScene" id=1] [ext_resource path="res://Data/Objects/Pusher.tscn" type="PackedScene" id=1]
[ext_resource path="res://Data/Objects/Player.tscn" type="PackedScene" id=2] [ext_resource path="res://Data/Objects/Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://Data/Graphics/UI/Progress_Back.png" type="Texture" id=8] [ext_resource path="res://Data/Graphics/UI/Progress_Back.png" type="Texture" id=8]
[ext_resource path="res://Data/Graphics/UI/Progress_Bar.png" type="Texture" id=9] [ext_resource path="res://Data/Graphics/UI/Progress_Bar.png" type="Texture" id=9]
[ext_resource path="res://Data/Scripts/UI/GUI.gd" type="Script" id=10] [ext_resource path="res://Data/Scripts/UI/GUI.gd" type="Script" id=10]
[ext_resource path="res://Data/Graphics/UI/Progress_Bar_H.png" type="Texture" id=11]
[ext_resource path="res://Data/Graphics/UI/Progress_Back_H.png" type="Texture" id=12]
[ext_resource path="res://Data/Fonts/Killer_Robot_20.tres" type="DynamicFont" id=13]
[ext_resource path="res://Data/Fonts/Hydrogen_64.tres" type="DynamicFont" id=14]


[sub_resource type="ShaderMaterial" id=1] [sub_resource type="ShaderMaterial" id=1]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource( 4 ) shader = ExtResource( 4 )
shader_param/sprite_scale = Vector2( 2.96, 1 )
shader_param/sprite_scale = Vector2( 2.35979, 1.50659 )
shader_param/distortion = 16.265 shader_param/distortion = 16.265
shader_param/liquid_color_main = Color( 0.513726, 0.137255, 0.137255, 1 ) shader_param/liquid_color_main = Color( 0.513726, 0.137255, 0.137255, 1 )
shader_param/liquid_color_surface = Color( 0.984314, 0.478431, 0.490196, 1 ) shader_param/liquid_color_surface = Color( 0.984314, 0.478431, 0.490196, 1 )
[sub_resource type="ShaderMaterial" id=2] [sub_resource type="ShaderMaterial" id=2]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource( 4 ) shader = ExtResource( 4 )
shader_param/sprite_scale = Vector2( 2.96, 1 )
shader_param/sprite_scale = Vector2( 1.66713, 1.11691 )
shader_param/distortion = 16.265 shader_param/distortion = 16.265
shader_param/liquid_color_main = Color( 0.180908, 0.250748, 0.8125, 1 ) shader_param/liquid_color_main = Color( 0.180908, 0.250748, 0.8125, 1 )
shader_param/liquid_color_surface = Color( 0.576471, 0.760784, 0.996078, 1 ) shader_param/liquid_color_surface = Color( 0.576471, 0.760784, 0.996078, 1 )


[node name="World" type="Node2D"] [node name="World" type="Node2D"]


[node name="Liquid2" parent="." instance=ExtResource( 3 )]
[node name="Level_00" type="Node2D" parent="."]

[node name="Liquid2" parent="Level_00" instance=ExtResource( 3 )]
material = SubResource( 1 ) material = SubResource( 1 )
position = Vector2( -127.435, 105.962 ) position = Vector2( -127.435, 105.962 )
scale = Vector2( 2.35979, 1.50659 ) scale = Vector2( 2.35979, 1.50659 )
liquid_body_color = Color( 0.513726, 0.137255, 0.137255, 1 ) liquid_body_color = Color( 0.513726, 0.137255, 0.137255, 1 )
liquid_surface_color = Color( 0.984314, 0.478431, 0.490196, 1 ) liquid_surface_color = Color( 0.984314, 0.478431, 0.490196, 1 )


[node name="Liquid" parent="." instance=ExtResource( 3 )]
[node name="Liquid" parent="Level_00" instance=ExtResource( 3 )]
material = SubResource( 2 ) material = SubResource( 2 )
position = Vector2( 539.108, -23.1772 ) position = Vector2( 539.108, -23.1772 )
scale = Vector2( 1.66713, 1.11691 ) scale = Vector2( 1.66713, 1.11691 )
liquid_body_color = Color( 0.180908, 0.250748, 0.8125, 1 ) liquid_body_color = Color( 0.180908, 0.250748, 0.8125, 1 )
liquid_surface_color = Color( 0.576471, 0.760784, 0.996078, 1 ) liquid_surface_color = Color( 0.576471, 0.760784, 0.996078, 1 )


[node name="Doorway" parent="." instance=ExtResource( 6 )]
[node name="Doorway" parent="Level_00" instance=ExtResource( 6 )]
position = Vector2( 94.9786, 581.025 ) position = Vector2( 94.9786, 581.025 )
color = Color( 0.0470588, 0.0156863, 0.980392, 1 ) color = Color( 0.0470588, 0.0156863, 0.980392, 1 )


[node name="Doorway2" parent="." instance=ExtResource( 6 )]
[node name="Doorway2" parent="Level_00" instance=ExtResource( 6 )]
position = Vector2( -306.381, 286.254 ) position = Vector2( -306.381, 286.254 )
rotation = 1.57079 rotation = 1.57079
color = Color( 0.0235294, 0.980392, 0.0156863, 1 ) color = Color( 0.0235294, 0.980392, 0.0156863, 1 )


[node name="BladeSaw" parent="." instance=ExtResource( 5 )]
[node name="BladeSaw" parent="Level_00" instance=ExtResource( 5 )]
position = Vector2( -389.595, -64.0996 ) position = Vector2( -389.595, -64.0996 )


[node name="BladeSaw2" parent="." instance=ExtResource( 5 )]
[node name="BladeSaw2" parent="Level_00" instance=ExtResource( 5 )]
position = Vector2( -298.686, -133.59 ) position = Vector2( -298.686, -133.59 )
degrees_per_second = -270.0 degrees_per_second = -270.0


[node name="Pusher" parent="." instance=ExtResource( 1 )]
[node name="Pusher" parent="Level_00" instance=ExtResource( 1 )]
position = Vector2( 108.94, -32.8218 ) position = Vector2( 108.94, -32.8218 )
pulse_color = Color( 0.980392, 0.980392, 0.74902, 1 ) pulse_color = Color( 0.980392, 0.980392, 0.74902, 1 )
push_force = 128.0 push_force = 128.0
push_angle = 34.923 push_angle = 34.923


[node name="TileMap" type="TileMap" parent="."]
[node name="TileMap" type="TileMap" parent="Level_00"]
tile_set = ExtResource( 7 ) tile_set = ExtResource( 7 )
collision_layer = 2 collision_layer = 2
format = 1 format = 1
[node name="GUI" type="CanvasLayer" parent="."] [node name="GUI" type="CanvasLayer" parent="."]
script = ExtResource( 10 ) script = ExtResource( 10 )


[node name="PlayerUI" type="Control" parent="GUI"]
[node name="PlayerUI" type="HBoxContainer" parent="GUI"]
margin_left = 10.0
margin_top = 10.0
margin_right = 40.0 margin_right = 40.0
margin_bottom = 40.0 margin_bottom = 40.0
custom_constants/separation = 14
__meta__ = {
"_edit_use_anchors_": false
}

[node name="NRG" type="VBoxContainer" parent="GUI/PlayerUI"]
margin_right = 41.0
margin_bottom = 164.0

[node name="Label" type="Label" parent="GUI/PlayerUI/NRG"]
margin_right = 41.0
margin_bottom = 24.0
custom_fonts/font = ExtResource( 13 )
text = "NRG"

[node name="Bar" type="TextureRect" parent="GUI/PlayerUI/NRG"]
margin_top = 28.0
margin_right = 41.0
margin_bottom = 146.0
texture = ExtResource( 12 )
stretch_mode = 4

[node name="Progress" type="TextureProgress" parent="GUI/PlayerUI/NRG/Bar"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -12.0
margin_top = -59.0
margin_right = 12.0
margin_bottom = 59.0
value = 70.0
texture_progress = ExtResource( 11 )
fill_mode = 3
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }


[node name="Tween" type="Tween" parent="GUI/PlayerUI/NRG/Bar/Progress"]

[node name="MoodBars" type="VBoxContainer" parent="GUI/PlayerUI"] [node name="MoodBars" type="VBoxContainer" parent="GUI/PlayerUI"]
margin_left = 10.0
margin_top = 10.0
margin_right = -10.0
margin_bottom = -10.0
margin_left = 55.0
margin_right = 311.0
margin_bottom = 164.0
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }


[node name="Aggression" type="VBoxContainer" parent="GUI/PlayerUI/MoodBars"] [node name="Aggression" type="VBoxContainer" parent="GUI/PlayerUI/MoodBars"]
margin_right = 256.0 margin_right = 256.0
margin_bottom = 42.0
margin_bottom = 52.0


[node name="Label" type="Label" parent="GUI/PlayerUI/MoodBars/Aggression"] [node name="Label" type="Label" parent="GUI/PlayerUI/MoodBars/Aggression"]
margin_right = 256.0 margin_right = 256.0
margin_bottom = 14.0
margin_bottom = 24.0
custom_fonts/font = ExtResource( 13 )
text = "Aggression" text = "Aggression"


[node name="Bar" type="TextureRect" parent="GUI/PlayerUI/MoodBars/Aggression"] [node name="Bar" type="TextureRect" parent="GUI/PlayerUI/MoodBars/Aggression"]
margin_top = 18.0
margin_top = 28.0
margin_right = 256.0 margin_right = 256.0
margin_bottom = 42.0
margin_bottom = 52.0
rect_min_size = Vector2( 256, 24 ) rect_min_size = Vector2( 256, 24 )
texture = ExtResource( 8 ) texture = ExtResource( 8 )


[node name="Tween" type="Tween" parent="GUI/PlayerUI/MoodBars/Aggression/Bar/Progress"] [node name="Tween" type="Tween" parent="GUI/PlayerUI/MoodBars/Aggression/Bar/Progress"]


[node name="Neediness" type="VBoxContainer" parent="GUI/PlayerUI/MoodBars"] [node name="Neediness" type="VBoxContainer" parent="GUI/PlayerUI/MoodBars"]
margin_top = 46.0
margin_top = 56.0
margin_right = 256.0 margin_right = 256.0
margin_bottom = 88.0
margin_bottom = 108.0


[node name="Label" type="Label" parent="GUI/PlayerUI/MoodBars/Neediness"] [node name="Label" type="Label" parent="GUI/PlayerUI/MoodBars/Neediness"]
margin_right = 256.0 margin_right = 256.0
margin_bottom = 14.0
margin_bottom = 24.0
custom_fonts/font = ExtResource( 13 )
text = "Neediness" text = "Neediness"


[node name="Bar" type="TextureRect" parent="GUI/PlayerUI/MoodBars/Neediness"] [node name="Bar" type="TextureRect" parent="GUI/PlayerUI/MoodBars/Neediness"]
margin_top = 18.0
margin_top = 28.0
margin_right = 256.0 margin_right = 256.0
margin_bottom = 42.0
margin_bottom = 52.0
rect_min_size = Vector2( 256, 24 ) rect_min_size = Vector2( 256, 24 )
texture = ExtResource( 8 ) texture = ExtResource( 8 )


[node name="Tween" type="Tween" parent="GUI/PlayerUI/MoodBars/Neediness/Bar/Progress"] [node name="Tween" type="Tween" parent="GUI/PlayerUI/MoodBars/Neediness/Bar/Progress"]


[node name="Contentment" type="VBoxContainer" parent="GUI/PlayerUI/MoodBars"] [node name="Contentment" type="VBoxContainer" parent="GUI/PlayerUI/MoodBars"]
margin_top = 92.0
margin_top = 112.0
margin_right = 256.0 margin_right = 256.0
margin_bottom = 134.0
margin_bottom = 164.0


[node name="Label" type="Label" parent="GUI/PlayerUI/MoodBars/Contentment"] [node name="Label" type="Label" parent="GUI/PlayerUI/MoodBars/Contentment"]
margin_right = 256.0 margin_right = 256.0
margin_bottom = 14.0
margin_bottom = 24.0
custom_fonts/font = ExtResource( 13 )
text = "Neediness" text = "Neediness"


[node name="Bar" type="TextureRect" parent="GUI/PlayerUI/MoodBars/Contentment"] [node name="Bar" type="TextureRect" parent="GUI/PlayerUI/MoodBars/Contentment"]
margin_top = 18.0
margin_top = 28.0
margin_right = 256.0 margin_right = 256.0
margin_bottom = 42.0
margin_bottom = 52.0
rect_min_size = Vector2( 256, 24 ) rect_min_size = Vector2( 256, 24 )
texture = ExtResource( 8 ) texture = ExtResource( 8 )


} }


[node name="Tween" type="Tween" parent="GUI/PlayerUI/MoodBars/Contentment/Bar/Progress"] [node name="Tween" type="Tween" parent="GUI/PlayerUI/MoodBars/Contentment/Bar/Progress"]

[node name="VBoxContainer" type="VBoxContainer" parent="GUI"]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -150.0
margin_top = 10.0
margin_right = -10.0
margin_bottom = 93.0
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Label" type="Label" parent="GUI/VBoxContainer"]
margin_right = 140.0
margin_bottom = 24.0
custom_fonts/font = ExtResource( 13 )
custom_colors/font_color = Color( 0.886275, 1, 0.827451, 1 )
text = "Time Elapsed"

[node name="TimeText" type="Label" parent="GUI/VBoxContainer"]
margin_top = 28.0
margin_right = 140.0
margin_bottom = 93.0
custom_fonts/font = ExtResource( 14 )
custom_colors/font_color = Color( 0.368627, 0.368627, 0.368627, 1 )
custom_colors/font_color_shadow = Color( 1, 1, 1, 1 )
text = "0:00"

+ 11
- 9
Data/Scripts/Controller.gd View File

const COLLISION_MAJOR_SPEED_THRESHOLD = 400 const COLLISION_MAJOR_SPEED_THRESHOLD = 400
const COLLISION_TIMEDT_THRESHOLD = 0.1 const COLLISION_TIMEDT_THRESHOLD = 0.1


export var max_stamina = 1000
export var stamina_regen_per_sec = 125
export var max_energy = 1000
export var energy_regen_per_sec = 125


# The base tangential acceleration that will be applied to the particles to give the # The base tangential acceleration that will be applied to the particles to give the
# player the illusion it's trying to move on it's own. This is just effects things visually (ATM) # player the illusion it's trying to move on it's own. This is just effects things visually (ATM)


# The base force applied when being pushed. # The base force applied when being pushed.
export var base_push_force = 64 setget _set_base_push_force export var base_push_force = 64 setget _set_base_push_force
export var push_stamina_cost = 100
export var push_energy_cost = 100




var current_stamina = max_stamina
var current_energy = max_energy


# The maximum distance from the player in which the mouse will adjust the push force. # The maximum distance from the player in which the mouse will adjust the push force.
# at max_mouse_distance the full base_push_force <+ modifiers> will be applied. # at max_mouse_distance the full base_push_force <+ modifiers> will be applied.
func get_mood(): func get_mood():
return $Mood return $Mood


func get_current_energy():
return current_energy


func _set_color_collision_mask(id): func _set_color_collision_mask(id):
set_collision_mask_bit(10, true) set_collision_mask_bit(10, true)
mouse_down = true mouse_down = true
elif Input.is_action_just_released("ButtonA"): elif Input.is_action_just_released("ButtonA"):
mouse_down = false mouse_down = false
if current_stamina >= push_stamina_cost:
current_stamina -= push_stamina_cost
if current_energy >= push_energy_cost:
current_energy -= push_energy_cost
push = true push = true




$Mood.shift_mood(delta, in_air, last_speed, (position - mouse_position).length()) $Mood.shift_mood(delta, in_air, last_speed, (position - mouse_position).length())
last_speed = linear_velocity.length() last_speed = linear_velocity.length()
current_stamina += stamina_regen_per_sec * delta
if current_stamina > max_stamina:
current_stamina = max_stamina
current_energy += energy_regen_per_sec * delta
if current_energy > max_energy:
current_energy = max_energy





+ 11
- 1
Data/Scripts/UI/GUI.gd View File

onready var _content_bar = get_node("PlayerUI/MoodBars/Contentment/Bar/Progress") onready var _content_bar = get_node("PlayerUI/MoodBars/Contentment/Bar/Progress")
onready var _content_bar_tween = get_node("PlayerUI/MoodBars/Contentment/Bar/Progress/Tween") onready var _content_bar_tween = get_node("PlayerUI/MoodBars/Contentment/Bar/Progress/Tween")


onready var _nrg_bar = get_node("PlayerUI/NRG/Bar/Progress")
onready var _nrg_bar_tween = get_node("PlayerUI/NRG/Bar/Progress/Tween")

# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
set_process(true) set_process(true)
_need_bar.value = 0.0 _need_bar.value = 0.0
_content_bar.max_value = 100.0 _content_bar.max_value = 100.0
_content_bar.value = 0.0 _content_bar.value = 0.0
_nrg_bar.max_value = get_node("../Player").max_energy
_nrg_bar.value = get_node("../Player").get_current_energy()




func _process(delta): func _process(delta):
UpdateMoodBars() UpdateMoodBars()


func UpdateMoodBars(): func UpdateMoodBars():
var mc = get_node("../Player").get_mood().get_mood_color()
var p = get_node("../Player")
var mc = p.get_mood().get_mood_color()
_agg_bar_tween.interpolate_property(_agg_bar, "value", _agg_bar.value, mc.r * 100, 0.1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) _agg_bar_tween.interpolate_property(_agg_bar, "value", _agg_bar.value, mc.r * 100, 0.1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
_agg_bar_tween.start() _agg_bar_tween.start()
_need_bar_tween.interpolate_property(_need_bar, "value", _need_bar.value, mc.g * 100, 0.1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) _need_bar_tween.interpolate_property(_need_bar, "value", _need_bar.value, mc.g * 100, 0.1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
_need_bar_tween.start() _need_bar_tween.start()
_content_bar_tween.interpolate_property(_content_bar, "value", _content_bar.value, mc.b * 100, 0.1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) _content_bar_tween.interpolate_property(_content_bar, "value", _content_bar.value, mc.b * 100, 0.1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
_content_bar_tween.start() _content_bar_tween.start()
_nrg_bar_tween.interpolate_property(_nrg_bar, "value", _nrg_bar.value, p.get_current_energy(), 0.1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
_nrg_bar_tween.start()

Loading…
Cancel
Save