feat(integration): wire Sprint 1 effects (water surface, godrays, caustics, bio particles, block burst) + rebuild v0.2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -203,8 +203,9 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||
|
||||
|
||||
func _on_block_break(hit_position: Vector3, _normal: Vector3) -> void:
|
||||
var broken_id: int = 0
|
||||
if NetworkManager.is_solo():
|
||||
var broken_id: int = world.break_block(hit_position)
|
||||
broken_id = world.break_block(hit_position)
|
||||
if broken_id > 0:
|
||||
inventory.add_item(broken_id, 1)
|
||||
AudioManager.play_bubble_sfx(hit_position)
|
||||
@@ -212,6 +213,16 @@ func _on_block_break(hit_position: Vector3, _normal: Vector3) -> void:
|
||||
_world_sync.server_break_block(hit_position)
|
||||
AudioManager.play_bubble_sfx(hit_position)
|
||||
|
||||
# Block break particle burst
|
||||
var bbp_script := load("res://scripts/dolphin/BlockBreakParticles.gd")
|
||||
var burst := GPUParticles3D.new()
|
||||
burst.set_script(bbp_script)
|
||||
add_child(burst)
|
||||
var broken_color: Color = Color(0.8, 0.6, 0.3) # default sand
|
||||
if broken_id > 0:
|
||||
broken_color = BlockDatabase.get_color(broken_id)
|
||||
burst.emit_burst(hit_position, broken_color)
|
||||
|
||||
|
||||
func _on_block_place(hit_position: Vector3, normal: Vector3) -> void:
|
||||
var selected: Variant = inventory.get_selected_item()
|
||||
|
||||
Reference in New Issue
Block a user