disable sg2083 and pan camera over to fami when defeated
This commit is contained in:
parent
12d6adaf94
commit
3ff2f837d8
5 changed files with 32 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
extends Node2D
|
||||
|
||||
|
||||
signal died()
|
||||
signal health_changed(amount)
|
||||
|
||||
|
||||
|
@ -45,10 +46,14 @@ func stop_push() -> void:
|
|||
|
||||
|
||||
func hurt(amount: float) -> void:
|
||||
if hp <= 0.0:
|
||||
return
|
||||
hp -= amount
|
||||
hp = max(hp, 0.0)
|
||||
emit_signal("health_changed", hp)
|
||||
if hp <= 0.0:
|
||||
state_chart.send_event("die")
|
||||
emit_signal("died")
|
||||
|
||||
|
||||
func _attack() -> void:
|
||||
|
|
|
@ -758,7 +758,7 @@ tracks/19/loop_wrap = true
|
|||
tracks/19/imported = false
|
||||
tracks/19/enabled = true
|
||||
tracks/19/keys = {
|
||||
"times": PoolRealArray( 0, 7 ),
|
||||
"times": PoolRealArray( 0, 7.6 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ true, false ]
|
||||
|
@ -1808,6 +1808,7 @@ linear_accel = -30.19
|
|||
[node name="DissolveParticles" type="CPUParticles2D" parent="."]
|
||||
material = ExtResource( 17 )
|
||||
position = Vector2( 4, -8 )
|
||||
z_index = -20
|
||||
emitting = false
|
||||
amount = 16
|
||||
local_coords = false
|
||||
|
|
|
@ -65,7 +65,7 @@ func _physics_process(delta: float) -> void:
|
|||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if state == State.DEAD:
|
||||
if state == State.DEAD or state == State.INACTIVE:
|
||||
return
|
||||
if event.is_action_pressed("shoot") and (state == State.STAND or state == State.FORWARD or state == State.BACK) and energy >= bullet_energy:
|
||||
shoot()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue