Allow Null hints
This commit is contained in:
parent
e115200194
commit
65ccb1905c
|
|
@ -90,3 +90,6 @@ func end_dodge() -> void:
|
||||||
transitioned.emit(self, play_char.walk_or_run)
|
transitioned.emit(self, play_char.walk_or_run)
|
||||||
else:
|
else:
|
||||||
transitioned.emit(self, "IdleState")
|
transitioned.emit(self, "IdleState")
|
||||||
|
|
||||||
|
func get_hints() -> Variant:
|
||||||
|
return null
|
||||||
|
|
|
||||||
|
|
@ -110,5 +110,5 @@ func jump() -> void:
|
||||||
play_char.squash_and_strech(1.12, 0.1)
|
play_char.squash_and_strech(1.12, 0.1)
|
||||||
#play_char.particles_manager.display_particles(play_char.jump_particles, play_char)
|
#play_char.particles_manager.display_particles(play_char.jump_particles, play_char)
|
||||||
|
|
||||||
func get_hints() -> Array:
|
func get_hints() -> Variant:
|
||||||
return [{"action": &"player_jump", "text": "Sauter"}]
|
return null
|
||||||
|
|
|
||||||
|
|
@ -69,5 +69,5 @@ func move(delta : float) -> void:
|
||||||
if !play_char.continious_run: play_char.walk_or_run = "WalkState"
|
if !play_char.continious_run: play_char.walk_or_run = "WalkState"
|
||||||
transitioned.emit(self, "IdleState")
|
transitioned.emit(self, "IdleState")
|
||||||
|
|
||||||
func get_hints() -> Array:
|
func get_hints() -> Variant:
|
||||||
return [{"action": &"player_jump", "text": "Sauter"}]
|
return null
|
||||||
|
|
|
||||||
|
|
@ -20,5 +20,5 @@ func physics_update(_delta : float) -> void:
|
||||||
#physics_process update
|
#physics_process update
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func get_hints() -> Array:
|
func get_hints() -> Variant:
|
||||||
return []
|
return []
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@ func _ready() -> void:
|
||||||
initial_state.enter(char_ref)
|
initial_state.enter(char_ref)
|
||||||
curr_state = initial_state
|
curr_state = initial_state
|
||||||
curr_state_name = curr_state.state_name
|
curr_state_name = curr_state.state_name
|
||||||
Hints.set_state_hints(curr_state.get_hints())
|
var hints = curr_state.get_hints()
|
||||||
|
if hints != null: Hints.set_state_hints(hints)
|
||||||
|
|
||||||
func _process(delta : float) -> void:
|
func _process(delta : float) -> void:
|
||||||
if curr_state: curr_state.update(delta)
|
if curr_state: curr_state.update(delta)
|
||||||
|
|
@ -74,7 +75,8 @@ func on_state_child_transition(state : State, new_state_name : String) -> void:
|
||||||
|
|
||||||
curr_state = new_state
|
curr_state = new_state
|
||||||
curr_state_name = curr_state.state_name
|
curr_state_name = curr_state.state_name
|
||||||
Hints.set_state_hints(curr_state.get_hints())
|
var hints = curr_state.get_hints()
|
||||||
|
if hints != null: Hints.set_state_hints(hints)
|
||||||
|
|
||||||
func set_state_blocked(state_name : String, blocked : bool) -> void:
|
func set_state_blocked(state_name : String, blocked : bool) -> void:
|
||||||
if blocked: blocked_states[state_name.to_lower()] = true
|
if blocked: blocked_states[state_name.to_lower()] = true
|
||||||
|
|
|
||||||
|
|
@ -71,5 +71,5 @@ func move(delta : float) -> void:
|
||||||
else:
|
else:
|
||||||
transitioned.emit(self, "IdleState")
|
transitioned.emit(self, "IdleState")
|
||||||
|
|
||||||
func get_hints() -> Array:
|
func get_hints() -> Variant:
|
||||||
return [{"action": &"player_jump", "text": "Sauter"}]
|
return null
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue