Mostly health

This commit is contained in:
2024-10-26 13:34:01 +02:00
parent b2105d3f62
commit 40b841e7af
12 changed files with 295 additions and 5 deletions

View File

@ -1,7 +1,8 @@
[gd_scene load_steps=11 format=3 uid="uid://c3i6a6ji8i1q8"]
[gd_scene load_steps=15 format=3 uid="uid://c3i6a6ji8i1q8"]
[ext_resource type="Texture2D" uid="uid://dl1pu82xwqw3m" path="res://sprites/characters/player.png" id="1_6xeiv"]
[ext_resource type="Script" path="res://scripts/playerscript.gd" id="1_sty7f"]
[ext_resource type="PackedScene" uid="uid://woincqnmbsax" path="res://scenes/gun.tscn" id="3_2dsng"]
[sub_resource type="AtlasTexture" id="AtlasTexture_0xuex"]
atlas = ExtResource("1_6xeiv")
@ -57,6 +58,24 @@ animations = [{
radius = 5.0
height = 18.0
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_vrmo8"]
radius = 7.0
height = 22.0
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ax0mg"]
bg_color = Color(0.664164, 0, 0.0638879, 1)
corner_radius_top_left = 1
corner_radius_top_right = 1
corner_radius_bottom_right = 1
corner_radius_bottom_left = 1
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vh4rv"]
bg_color = Color(0, 0.724967, 0.216409, 1)
corner_radius_top_left = 1
corner_radius_top_right = 1
corner_radius_bottom_right = 1
corner_radius_bottom_left = 1
[node name="player" type="CharacterBody2D"]
script = ExtResource("1_sty7f")
@ -65,8 +84,31 @@ position = Vector2(0, -8)
sprite_frames = SubResource("SpriteFrames_gatfb")
animation = &"idle"
autoplay = "idle"
frame_progress = 0.0176069
frame_progress = 0.491158
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -9)
shape = SubResource("CapsuleShape2D_4lp1q")
[node name="Gun" parent="." instance=ExtResource("3_2dsng")]
position = Vector2(0, -7)
[node name="Hurtbox" type="Area2D" parent="."]
unique_name_in_owner = true
collision_mask = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hurtbox"]
position = Vector2(0, -9)
shape = SubResource("CapsuleShape2D_vrmo8")
debug_color = Color(0.821755, 0.152326, 0.89675, 0.42)
[node name="ProgressBar" type="ProgressBar" parent="."]
unique_name_in_owner = true
offset_left = -13.0
offset_top = -25.0
offset_right = 14.0
offset_bottom = -20.0
theme_override_styles/background = SubResource("StyleBoxFlat_ax0mg")
theme_override_styles/fill = SubResource("StyleBoxFlat_vh4rv")
value = 100.0
show_percentage = false