From ab0a4e24f73ea8d67edaad5e6f2a5cc9d61c9a6e Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 4 Mar 2026 17:09:47 +0000 Subject: [PATCH] Heads now stick to glass tables (and bleed). --- scenes/bullet.gd | 15 ++++++++++--- scenes/shards.gd | 2 +- scenes/wave.gd | 6 ++--- sprites/head_splat.png | Bin 0 -> 210 bytes sprites/head_splat.png.import | 40 ++++++++++++++++++++++++++++++++++ 5 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 sprites/head_splat.png create mode 100644 sprites/head_splat.png.import diff --git a/scenes/bullet.gd b/scenes/bullet.gd index 1a2c0da..e040f21 100644 --- a/scenes/bullet.gd +++ b/scenes/bullet.gd @@ -7,6 +7,8 @@ var shader_active = false var pause = false var target = null +@onready var head_splat = preload("res://sprites/head_splat.png") + func start(pos): position = pos @@ -49,9 +51,16 @@ func _on_area_entered(area: Area2D) -> void: "shards": if area.is_in_group("shards"): print("Shards hit!") - area.hit_detection() - #stick_to_target(target) - queue_free() + area.hit_detection() + # stick_to_target(target) + reparent(area) + $Sprite2D.texture = head_splat + $Sprite2D.hframes = 1 + position = Vector2.ZERO + pause = true + $Sprite2D/GPUParticles2D.hide() + monitoring = false + "mirror": diff --git a/scenes/shards.gd b/scenes/shards.gd index 7a69e7c..575c947 100644 --- a/scenes/shards.gd +++ b/scenes/shards.gd @@ -6,7 +6,7 @@ var enemy_type: String = "shards" @onready var child_node = get_node("Player") func hit_detection(): - print("Shift!") + #print("Shift!") #var tween = create_tween().set_parallel(true) #tween.tween_property($Sprite, "position:y", 4, 0.1) #tween.tween_property($Sprite, "position:y", 0, 0.05) diff --git a/scenes/wave.gd b/scenes/wave.gd index 7ee9cb1..f6ee453 100644 --- a/scenes/wave.gd +++ b/scenes/wave.gd @@ -25,7 +25,7 @@ func _ready(): func spawn_enemies(): - if wave_count == 2: #This is for CHICKENS + if wave_count == 1: #This is for CHICKENS print("Enemy Wave: ", wave_count) enemy = CHICKEN for x in range(COLS): @@ -53,7 +53,7 @@ func spawn_enemies(): enemy_count = rows_mod * cols_mod await get_tree().process_frame - if wave_count == 3 : #This if for Mirror + if wave_count == 0 : #This if for Mirror print("Enemy Wave: ", wave_count) # Spawn Table @@ -89,7 +89,7 @@ func spawn_enemies(): s.start_all_animations() - if wave_count == 0 : #This is for Boss + if wave_count == 2 : #This is for Boss # Hide the player diff --git a/sprites/head_splat.png b/sprites/head_splat.png new file mode 100644 index 0000000000000000000000000000000000000000..a1b96d4fda57f4a9955a362ef6d7e98344494aef GIT binary patch literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRt!3-oH7vA{>q!^2X+?^QKos)S96- yPHH^QjXGt~ARj#$8E$X&OMY89ZJ6T-G@yGywp7@JrtS literal 0 HcmV?d00001 diff --git a/sprites/head_splat.png.import b/sprites/head_splat.png.import new file mode 100644 index 0000000..a7c1889 --- /dev/null +++ b/sprites/head_splat.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://whgwb5c750lk" +path="res://.godot/imported/head_splat.png-2dd7aa8d11d236451176ca1dc6411bb6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/head_splat.png" +dest_files=["res://.godot/imported/head_splat.png-2dd7aa8d11d236451176ca1dc6411bb6.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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