This commit is contained in:
MarcEricMartel 2023-01-15 14:39:48 -05:00
parent 96303b6434
commit c52e4a2185
4 changed files with 42 additions and 11 deletions

BIN
Images/eniv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

34
Images/eniv.png.import Normal file
View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://drkbrxdk6s40s"
path="res://.godot/imported/eniv.png-b581d2ab312dd8182bad8b245285147a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/eniv.png"
dest_files=["res://.godot/imported/eniv.png-b581d2ab312dd8182bad8b245285147a.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -7,6 +7,7 @@ extends CharacterBody2D
@onready var raycast = $RayCast2D;
@onready var sprite = $AnimatedSprite2D;
@onready var bladderUI = $Bladder;
var animation_count = 0;
@ -47,7 +48,7 @@ func take_damage(damage):
if sprite.animation != "damage":
HP = HP - damage;
sprite.play("damage");
$Bladder.material.set("fill",clamp((100.0 - HP) / 100.0, 0.0, 1.0));
bladderUI.material.set("fill",clamp((100.0 - HP) / 100.0, 0.0, 1.0));
if HP <= 0:
kill();

View File

@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=3 uid="uid://d25c4ey6gvduc"]
[gd_scene load_steps=4 format=3 uid="uid://d25c4ey6gvduc"]
[ext_resource type="Texture2D" uid="uid://cg848qjc4fxi" path="res://Images/Main_menu.png" id="1_65g7h"]
[ext_resource type="Script" path="res://start.gd" id="1_exncb"]
[ext_resource type="Texture2D" uid="uid://drkbrxdk6s40s" path="res://Images/eniv.png" id="3_5j2rv"]
[node name="Start" type="Node2D"]
script = ExtResource("1_exncb")
@ -23,14 +24,9 @@ theme_override_colors/font_hover_color = Color(0, 0, 0.65098, 1)
text = "Start Game"
flat = true
[node name="Label" type="Label" parent="."]
offset_left = 1318.0
offset_top = 109.0
offset_right = 1728.0
offset_bottom = 310.0
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 145
text = "ENVIE
"
[node name="Eniv" type="Sprite2D" parent="."]
position = Vector2(1632, 266)
scale = Vector2(4, 4)
texture = ExtResource("3_5j2rv")
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]