fix: empty 3x3 tiles below candy cannon and add outline shaders to cannon, projectiles, bubbles and vfx

This commit is contained in:
2026-06-29 20:53:28 +08:00
parent 37c179a9e1
commit a5595dbd6b
2 changed files with 51 additions and 7 deletions
+16 -5
View File
@@ -412,11 +412,11 @@ func _apply_arena_setup() -> void:
var pos = Vector2i(x, z)
# Center 3x3 block: NPC obstacle (Candy Pump)
if _is_npc_zone(pos):
# Make the floor walkable visually instead of obstacle red
gridmap.set_cell_item(Vector3i(x, 0, z), TILE_WALKABLE)
gridmap.set_cell_item(Vector3i(x, 1, z), -1)
continue
if _is_npc_zone(pos):
# Make the floor empty (-1) beneath the Candy Pump
gridmap.set_cell_item(Vector3i(x, 0, z), -1)
gridmap.set_cell_item(Vector3i(x, 1, z), -1)
continue
# Boundary walls: perimeter (row 0, row 19, col 0, col 19)
if x == 0 or x == ARENA_COLUMNS - 1 or z == 0 or z == ARENA_ROWS - 1:
@@ -982,6 +982,12 @@ func _spawn_impact_particles(targets: Array) -> void:
spatial_mat.emission_enabled = true
spatial_mat.emission = Color(1.0, 0.6, 0.8)
spatial_mat.emission_energy_multiplier = 2.0
# Outline shader for splash VFX
var outline_mat = ShaderMaterial.new()
outline_mat.shader = load("res://assets/shaders/outline3d.gdshader")
spatial_mat.next_pass = outline_mat
mesh.material = spatial_mat
particles.draw_pass_1 = mesh
@@ -1558,6 +1564,11 @@ func _spawn_bubble_visual(center: Vector2i) -> void:
mat.emission_enabled = true
mat.emission = Color(1.0, 0.2, 0.6)
mat.emission_energy_multiplier = 1.5
var outline_mat = ShaderMaterial.new()
outline_mat.shader = load("res://assets/shaders/outline3d.gdshader")
mat.next_pass = outline_mat
mesh_inst.material_override = mat
var main = get_node_or_null("/root/Main")