Level Exit Doodad #10

Closed
opened 2019-06-28 19:35:52 +00:00 by kirsle · 0 comments

Add support for a level exit doodad.

Implementation ideas:

  • PlayScene would probably call a uix.Canvas.OnExitLevel = func() handler to define the callback. (To show a UI alert window)
    • Or maybe it should be a handler on the scripting.Supervisor? Since the Canvas itself doesn't need to know about it; it would call an OnCollide actor handler which would call EndLevel from JS, the script supervisor could directly call the handler.
  • JavaScript API for doodads: GamePlay.EndLevel() called in an OnCollide handler to end the level.
    • Could be a return value? uix.Canvas already has a handler for "return false", could be like return GamePlay.EndLevel; for custom type.
  • PlayScene would show a ui.Window above the level and pause gameplay when the level ends.
    • Buttons for the ui.Window:
      • If you came from EditorScene: "Edit Level", "Restart Level"
      • If you are playing a one-off level: "Return to Menu", "Restart Level"
      • If you are playing a campaign mode: "Next Level", "Save and Quit"
Add support for a level exit doodad. Implementation ideas: * PlayScene would probably call a `uix.Canvas.OnExitLevel = func()` handler to define the callback. (To show a UI alert window) * Or maybe it should be a handler on the scripting.Supervisor? Since the Canvas itself doesn't need to know about it; it would call an OnCollide actor handler which would call EndLevel from JS, the script supervisor could directly call the handler. * JavaScript API for doodads: `GamePlay.EndLevel()` called in an OnCollide handler to end the level. * Could be a return value? uix.Canvas already has a handler for "return false", could be like `return GamePlay.EndLevel;` for custom type. * PlayScene would show a ui.Window above the level and pause gameplay when the level ends. * Buttons for the ui.Window: * If you came from EditorScene: "Edit Level", "Restart Level" * If you are playing a one-off level: "Return to Menu", "Restart Level" * If you are playing a campaign mode: "Next Level", "Save and Quit"
kirsle added the
enhancement
label 2019-06-28 19:35:52 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SketchyMaze/doodle#10
There is no content yet.