L'arrivée de la boulangerie

Il n'y a rien dedans, mais elle est ouverte. Bonne visite
This commit is contained in:
Thomas
2025-03-30 14:38:20 +02:00
parent 9ecea272ab
commit a82237ff28
90 changed files with 21888 additions and 46 deletions

View File

@@ -1,30 +1,33 @@
~ start
if GameState.playerIsDeaf:
Bob: BONJOUR L'AMI [if GameState.hasChosenNotToMakeChoices]QUI N'AIME PAS FAIRE DE CHOIX[/if]! JE PARLE FORT POUR QUE TU ENTENDES OKAY?
if GameState.isPlayerDeaf:
Bob: [if GameState.hasMetBob]REB[/if][if !GameState.hasMetBob]B[/if]ONJOUR L'AMI [if GameState.hasChosenNotToMakeChoices]QUI N'AIME PAS FAIRE DE CHOIX[/if]! JE PARLE FORT POUR QUE TU ENTENDES OKAY?
else:
Bob: Bonjour l'ami [if GameState.hasChosenNotToMakeChoices]qui n'aime pas faire de choix[/if]
Bob: [if GameState.hasMetBob]Reb[/if][if !GameState.hasMetBob]B[/if]onjour l'ami [if GameState.hasChosenNotToMakeChoices]qui n'aime pas faire de choix[/if]
if GameState.hasMetBob == false
set GameState.hasMetBob = true
if GameState.isUsingTouch == false
Bob: Je vois que t'es venu au clavier! Tu peux aussi te déplacer à a la souris.
else:
Bob: Je vois que t'es venu avec tes petits doigts! Tu peux aussi te déplacer au clavier.
else:
if GameState.hasVisitedBakery == false
Bob: Je t'ai dit que la boulangerie à ouvert ses portes?
if GameState.hasCompletedBobDialogue == true
Bob: On s'est déjà tout dit, tchö => END
if GameState.isUsingTouch == false
Bob: Je vois que t'es venu au clavier!
else:
Bob: Je vois que t'es venu avec tes petits doigts!
% Bob: Qu'estce qui t'amène sur chaussette sale??
%
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: Bon on s'est déjà tout dit, tchö => END
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
Bob: Petit chenapan! Tu viens d'en faire un, tu m'a l'air d'un sacré loustic!
set GameState.hasChosenNotToMakeChoices = true
- Oui! [if GameState.hasChosenToMakeChoices == false]
Bob: Je savais que tu choisirai quelque chose. Bravo pour ce choix conséquent qui aura des conséquences conséquentes.
Bob: Je savais que tu choisirai quelque chose. Bravo pour ce choix qui aura des conséquences.
set GameState.hasChosenToMakeChoices = true
- Pardon? J'ai mal entendu [if GameState.playerIsDeaf == false]
set GameState.playerIsDeaf = true
- Pardon? J'ai mal entendu [if GameState.isPlayerDeaf == false]
set GameState.isPlayerDeaf = true
=> start
- Oula! je'm'casse! => after_choices
Bob: Bon j'ai pas toute la journée alors, est-ce que tu veux faire d'autres choix?
=> choices
~ after_choices
if GameState.hasChosenToMakeChoices == true and GameState.hasChosenNotToMakeChoices == true

View File

@@ -15,6 +15,7 @@ var humanInteractionTarget: Human = null
var interactionClueFor : Human
var interactionPaused= false
var kill_path_finder = false
signal start_intracting
@@ -70,9 +71,6 @@ func _physics_process(delta):
humanInteractionTarget = wants_to_interact_with as Human
humanInteractionTarget.start_interaction(self)
func _on_area_2d_body_entered(body: Node2D) -> void:
print(body)
func start_interaction(askingForInteraction: Human):
emit_signal("start_intracting", askingForInteraction)
interactionPaused = true

View File

@@ -16,7 +16,6 @@ func _ready() -> void:
astar_grid = AStarGrid2D.new()
astar_grid.region = world.get_used_rect()
astar_grid.cell_size = Vector2(48, 48)
astar_grid.diagonal_mode = AStarGrid2D.DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE
astar_grid.default_compute_heuristic = AStarGrid2D.HEURISTIC_CHEBYSHEV
astar_grid.default_estimate_heuristic = AStarGrid2D.HEURISTIC_CHEBYSHEV
astar_grid.update()
@@ -46,6 +45,9 @@ func _process(delta: float) -> void:
return
if controled.wants_to_interact_with:
destination = Vector2.INF
if controled.kill_path_finder:
destination = Vector2.INF
controled.kill_path_finder = false
if destination != Vector2.INF:
var my_global_position = controled.get_feet_global_position()

View File

@@ -94,4 +94,7 @@ collide_with_bodies = false
can_walk_on_roads = true
[connection signal="area_entered" from="Area2D" to="." method="_on_area_2d_area_entered"]
[connection signal="area_entered" from="Area2D" to="controleur" method="_on_declencheur"]
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
[connection signal="body_entered" from="Area2D" to="controleur" method="_on_area_2d_body_entered"]
[connection signal="body_exited" from="Area2D" to="controleur" method="_on_area_2d_body_exited"]

View File

@@ -17,6 +17,8 @@ func _unhandled_input(event: InputEvent) -> void:
human.velocityVector = Input.get_vector("move_left", "move_right", "move_up", "move_down")
if human.velocityVector != Vector2(0, 0):
GameState.isUsingTouch = false
else:
update_game_state()
if event.is_action_pressed("grab"):
if can_interact_with:
@@ -32,10 +34,9 @@ func _unhandled_input(event: InputEvent) -> void:
pathFinder.destination = get_global_mouse_position()
func update_game_state():
GameState.player_positions = human.get_feet_global_position()
GameState.update_position(human.get_feet_global_position())
func _process(delta) -> void:
update_game_state()
ray.target_position = human.last_facing_direction * 48
if human.last_facing_direction.y > 0 :
@@ -88,3 +89,11 @@ func _process(delta) -> void:
can_interact_with = closest
if can_interact_with:
can_interact_with.enable_interaction_clue(human)
func _on_area_2d_body_entered(body: Node2D) -> void:
if body.has_method("do_trap") :
human.kill_path_finder = true
body.do_trap()
func _on_area_2d_body_exited(body: Node2D) -> void:
pass