some more stuff :O
This commit is contained in:
parent
60294d21dc
commit
2038b5ca7a
10 changed files with 76 additions and 29 deletions
|
@ -114,7 +114,8 @@ func _physics_process(delta: float) -> void:
|
|||
sprite.global_position = graphics.global_position.round() + Vector2(0.0, -10.0)
|
||||
# update transition guard properties
|
||||
# whether player can currently shoot an arrow
|
||||
var can_shoot = Game.arrows > 0 and get_tree().get_nodes_in_group("player_arrow").size() == 0
|
||||
var can_shoot = Game.stars >= 5
|
||||
# var can_shoot = Game.arrows > 0 and get_tree().get_nodes_in_group("player_arrow").size() == 0
|
||||
state_chart.set_guard_property("can_shoot", can_shoot)
|
||||
|
||||
# check for and propagate input events
|
||||
|
|
|
@ -1007,6 +1007,7 @@ texture = ExtResource( 4 )
|
|||
unique_name_in_owner = true
|
||||
position = Vector2( 9, -6 )
|
||||
collision_mask = 5
|
||||
monitoring = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Graphics/ShootHitbox"]
|
||||
position = Vector2( -8.5, 0.5 )
|
||||
|
@ -1148,6 +1149,7 @@ initial_state = NodePath("Still")
|
|||
script = ExtResource( 10 )
|
||||
to = NodePath("../../../Airborne/AirDash")
|
||||
event = "shoot"
|
||||
guard_expression = "can_shoot"
|
||||
|
||||
[node name="On PushStart" type="Node" parent="StateChart/Root/Movement/Grounded/CanWalk"]
|
||||
script = ExtResource( 10 )
|
||||
|
@ -1227,6 +1229,7 @@ event = "duck_released"
|
|||
script = ExtResource( 10 )
|
||||
to = NodePath("../../../Airborne/AirDash")
|
||||
event = "shoot"
|
||||
guard_expression = "can_shoot"
|
||||
|
||||
[node name="On Jump" type="Node" parent="StateChart/Root/Movement/Grounded/Ducking"]
|
||||
script = ExtResource( 10 )
|
||||
|
@ -1279,6 +1282,7 @@ event = "grounded"
|
|||
script = ExtResource( 10 )
|
||||
to = NodePath("../AirDash")
|
||||
event = "shoot"
|
||||
guard_expression = "can_shoot"
|
||||
|
||||
[node name="On LadderTouched" type="Node" parent="StateChart/Root/Movement/Airborne"]
|
||||
script = ExtResource( 10 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue