Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Updated exit documentation #545

Merged
merged 5 commits into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion addons/escoria-core/game/core-scripts/esc_exit.gd
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# An item that streamlines exiting scenes
# An item that streamlines exiting scenes.
balloonpopper marked this conversation as resolved.
Show resolved Hide resolved
#
# Use this when you want this object to only change scenes (with an optional
# sound effect.)
balloonpopper marked this conversation as resolved.
Show resolved Hide resolved
#
# If you want to attach the exit to a script to perform additional actions -
# a cutscene for example, use an ESCItem with "Is Exit" selected instead.
balloonpopper marked this conversation as resolved.
Show resolved Hide resolved
#
# The game character will automatically walk to an ESCLocation created as a
# child of an ESCExit node.
balloonpopper marked this conversation as resolved.
Show resolved Hide resolved
extends ESCItem
class_name ESCExit, "res://addons/escoria-core/design/esc_exit.svg"

Expand Down
9 changes: 7 additions & 2 deletions addons/escoria-core/game/core-scripts/esc_item.gd
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# ESCItem is a Sprite that defines an item, potentially interactive
# ESCItem is a Sprite that defines an item, potentially interactive.
balloonpopper marked this conversation as resolved.
Show resolved Hide resolved
balloonpopper marked this conversation as resolved.
Show resolved Hide resolved
#
# The game character will automatically walk to an ESCLocation that
# is created as a child of an ESCItem.
tool
extends Area2D
class_name ESCItem, "res://addons/escoria-core/design/esc_item.svg"
Expand Down Expand Up @@ -53,7 +56,9 @@ export(String) var global_id
# The ESC script for this item
export(String, FILE, "*.esc") var esc_script

# If true, the ESC script may have an ":exit_scene" event to manage scene changes
# If true, the ESC script may have an ":exit_scene" event to manage scene changes.
# For simple exits that do not require scripted actions, the ESCExit node may be
balloonpopper marked this conversation as resolved.
Show resolved Hide resolved
# preferred.
export(bool) var is_exit

# If true, object is considered as trigger. Allows using :trigger_in and
Expand Down