1
Fork 0
mirror of https://github.com/RYGhub/the-cold-night.git synced 2024-11-24 13:44:18 +00:00

💥 Fix arrow damage

This commit is contained in:
Steffo 2022-04-05 00:48:32 +02:00
parent 32ca5d2de2
commit adee9c86a4
Signed by: steffo
GPG key ID: 6965406171929D01
27 changed files with 26 additions and 182 deletions

View file

@ -27,6 +27,5 @@ func do_damage(to, multiplier):
parent.queue_free()
func _on_BulletMovement_collided(_origin, collision):
do_damage(collision.collider, 1)

View file

@ -16,7 +16,7 @@ script = ExtResource( 3 )
dim_texture = ExtResource( 2 )
dim_damage = -10.0
lit_texture = ExtResource( 7 )
lit_damage = -10
lit_damage = -10.0
lit_piercing = true
[node name="Shape" type="CollisionShape2D" parent="." index="0"]

View file

@ -22,4 +22,4 @@ texture = ExtResource( 2 )
movement_per_second = 200.0
[node name="Damaging" parent="." index="2"]
damage = 50.0
damage = -50.0

View file

@ -3,7 +3,7 @@ class_name Fire
func _on_Flame_body_entered(body):
var flammable = body.get_node("Flammable")
var flammable = body.get_node_or_null("Flammable")
if flammable != null:
flammable.catch_fire()

View file

@ -3,7 +3,7 @@
[ext_resource path="res://src/levels/ui/fonts/SourceSerifPro-Regular.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://src/ui/fonts/SourceSerifPro-Light.ttf" type="DynamicFontData" id=2]
[ext_resource path="res://src/levels/ui/PlayButton.png" type="Texture" id=3]
[ext_resource path="res://src/levels/ui/ui/Title.png" type="Texture" id=4]
[ext_resource path="res://src/levels/ui/Title.png" type="Texture" id=4]
[ext_resource path="res://src/levels/endings/Credits.tscn" type="PackedScene" id=5]
[sub_resource type="DynamicFont" id=9]

View file

@ -4,7 +4,7 @@
[ext_resource path="res://src/entities/fire/Fire.tscn" type="PackedScene" id=2]
[ext_resource path="res://src/ui/fonts/SourceSerifPro-Light.ttf" type="DynamicFontData" id=3]
[ext_resource path="res://src/levels/ui/PlayButton.png" type="Texture" id=4]
[ext_resource path="res://src/levels/ui/ui/Title.png" type="Texture" id=5]
[ext_resource path="res://src/levels/ui/Title.png" type="Texture" id=5]
[ext_resource path="res://src/levels/endings/Credits.tscn" type="PackedScene" id=6]
[sub_resource type="DynamicFont" id=4]

View file

@ -1,17 +1,17 @@
[gd_scene load_steps=10 format=2]
[ext_resource path="res://src/ui/fonts/SourceSerifPro-Light.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://src/levels/ui/ui/Title.png" type="Texture" id=2]
[ext_resource path="res://src/levels/ui/Title.png" type="Texture" id=2]
[ext_resource path="res://src/levels/ui/PlayButton.png" type="Texture" id=3]
[ext_resource path="res://src/entities/fire/Fire.tscn" type="PackedScene" id=4]
[ext_resource path="res://src/levels/ui/fonts/SourceSerifPro-Regular.ttf" type="DynamicFontData" id=5]
[sub_resource type="DynamicFont" id=4]
[sub_resource type="DynamicFont" id=1]
size = 22
font_data = ExtResource( 5 )
[sub_resource type="Theme" id=2]
default_font = SubResource( 4 )
default_font = SubResource( 1 )
[sub_resource type="DynamicFont" id=3]
size = 70
@ -45,9 +45,6 @@ scale = Vector2( 4, 4 )
[node name="FlameSprite" parent="TheDarkNightUI/MenuFire/Flame/Shape" index="0"]
frame = 0
[node name="Damaging" parent="TheDarkNightUI/MenuFire" index="3"]
damage = -5.0
[node name="Play" type="Button" parent="TheDarkNightUI"]
anchor_left = 1.0
anchor_top = 1.0

View file

@ -1,9 +1,9 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://src/levels/ui/ui/LifeBarBg.png" type="Texture" id=1]
[ext_resource path="res://src/levels/ui/LifeBarBg.png" type="Texture" id=1]
[ext_resource path="res://src/pickups/WeaponCrossbow.png" type="Texture" id=2]
[ext_resource path="res://src/levels/ui/ui/LifeBarFg.png" type="Texture" id=3]
[ext_resource path="res://src/levels/ui/ui/CrossbowBar.gd" type="Script" id=4]
[ext_resource path="res://src/levels/ui/LifeBarFg.png" type="Texture" id=3]
[ext_resource path="res://src/levels/ui/CrossbowBar.gd" type="Script" id=4]
[node name="CrossbowBar" type="Node"]
script = ExtResource( 4 )

BIN
src/levels/ui/LifeBarBg.png (Stored with Git LFS)

Binary file not shown.

View file

@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2

BIN
src/levels/ui/LifeBarFg.png (Stored with Git LFS)

Binary file not shown.

View file

@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2

BIN
src/levels/ui/Title.png (Stored with Git LFS)

Binary file not shown.

View file

@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2

BIN
src/levels/ui/UIBar.png (Stored with Git LFS)

Binary file not shown.

View file

@ -20,7 +20,7 @@ compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2

View file

@ -55,7 +55,7 @@ margin_bottom = 65.0
value = 100.0
texture_under = ExtResource( 5 )
texture_progress = ExtResource( 3 )
texture_progress_offset = Vector2( 10, 5 )
texture_progress_offset = Vector2( 2, 0 )
script = ExtResource( 9 )
[node name="MuteButton" type="Button" parent="TheDarkNightUI"]

BIN
src/levels/ui/ui/LifeBarBg.png (Stored with Git LFS)

Binary file not shown.

View file

@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/LifeBarBg.png-d71b079c37d64cced487d360afc4c7ba.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/levels/ui/ui/LifeBarBg.png"
dest_files=[ "res://.import/LifeBarBg.png-d71b079c37d64cced487d360afc4c7ba.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=true
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
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
src/levels/ui/ui/LifeBarFg.png (Stored with Git LFS)

Binary file not shown.

View file

@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/LifeBarFg.png-b0ac7e8ba66eed8291352f0882a46c4e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/levels/ui/ui/LifeBarFg.png"
dest_files=[ "res://.import/LifeBarFg.png-b0ac7e8ba66eed8291352f0882a46c4e.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=true
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
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
src/levels/ui/ui/Title.png (Stored with Git LFS)

Binary file not shown.

View file

@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Title.png-94ff37ec420aec401cb4863338e48dea.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/levels/ui/ui/Title.png"
dest_files=[ "res://.import/Title.png-94ff37ec420aec401cb4863338e48dea.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=true
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
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
src/levels/ui/ui/UIBar.png (Stored with Git LFS)

Binary file not shown.

View file

@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/UIBar.png-115d86e0d213dad70a8a39ba5bb9e894.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/levels/ui/ui/UIBar.png"
dest_files=[ "res://.import/UIBar.png-115d86e0d213dad70a8a39ba5bb9e894.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=true
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
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View file

@ -13,8 +13,8 @@ var previous_spawn
func _on_picked_up():
previous_spawn = target.spawning
target.spawning = new_spawning
target.connect("shot", self, "_on_shot")
target.connect("shot", self, "_on_shot", [], CONNECT_ONESHOT)
func _on_shot():
func _on_shot(_origin, _whatever):
target.spawning = previous_spawn