visibility rework
This commit is contained in:
parent
6b939d241c
commit
9d0e09220d
37 changed files with 212 additions and 75 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue