la souris fait bouger qu'au clic gauche
This commit is contained in:
@@ -14,6 +14,7 @@ else:
|
||||
Bob: Est-ce que tu connais les contrôles du jeu?
|
||||
Bob: En vrai, si tu est venu jusqu'à moi et qu'on parle, je suppose que oui!
|
||||
Bob: Est-ce que tu veux faire des choix?
|
||||
~ choices
|
||||
- Non merci [if GameState.hasChosenNotToMakeChoices == false]
|
||||
Bob: Petit chenapan! Tu viens d'en faire un, tu m'a l'air d'un sacré loustic, allez file avant que je t'oublies
|
||||
set GameState.hasChosenNotToMakeChoices = true
|
||||
@@ -23,7 +24,9 @@ Bob: Est-ce que tu veux faire des choix?
|
||||
- Pardon? J'ai mal entendu [if GameState.playerIsDeaf == false]
|
||||
set GameState.playerIsDeaf = true
|
||||
=> start
|
||||
- Oula! je'm'casse!
|
||||
- Oula! je'm'casse! => after_choices
|
||||
=> choices
|
||||
~ after_choices
|
||||
if GameState.hasChosenToMakeChoices == true and GameState.hasChosenNotToMakeChoices == true
|
||||
=> next_dialogue
|
||||
=> END
|
||||
|
||||
@@ -25,14 +25,17 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||
human.wants_to_grab = true
|
||||
|
||||
# moving using either touch or mouse button
|
||||
if event is InputEventMouseButton or event is InputEventScreenTouch:
|
||||
if event.is_action_pressed("touch") or event is InputEventScreenTouch:
|
||||
GameState.isUsingTouch = true
|
||||
var tile_pos = world.local_to_map(world.to_local(get_global_mouse_position()))
|
||||
if event.pressed:
|
||||
if event.is_pressed():
|
||||
pathFinder.destination = get_global_mouse_position()
|
||||
|
||||
func update_game_state():
|
||||
GameState.player_positions = human.get_feet_global_position()
|
||||
|
||||
func _process(delta) -> void:
|
||||
GameState.player_positions = human.get_feet_global_position()
|
||||
update_game_state()
|
||||
ray.target_position = human.last_facing_direction * 48
|
||||
|
||||
if human.last_facing_direction.y > 0 :
|
||||
|
||||
Reference in New Issue
Block a user