visibility rework

This commit is contained in:
Rendo 2025-11-27 15:52:30 +05:00
commit 9d0e09220d
37 changed files with 212 additions and 75 deletions

View file

@ -1,5 +1,6 @@
extends WeaponState
const active_bomb: PackedScene = preload("res://scenes/weapons/active_bomb.tscn")
func enter():
machine.animation_player.play(machine.animation_prefix+"plant")
@ -10,8 +11,13 @@ func exit():
func on_animation_finished(animation: StringName):
if animation == machine.animation_prefix + "plant":
var bomb = active_bomb.instantiate()
Session.dynamic_objects_container.add_child(bomb,true)
bomb.global_position = machine.player_camera.get_parent().global_position
return_to_previous.emit()
func state_input(event: InputEvent) -> void:
if event.is_action_released("plr_bomb"):
return_to_previous.emit()