feat: Updated exit documentation (#545)
Co-authored-by: Dennis Ploeger <github.dennis@dieploegers.de> Co-authored-by: Duncan Brown <duncan@prometheussoftware.ca> Co-authored-by: Balloonpopper <balloonpopper@git.com>
This commit is contained in:
@@ -1,4 +1,15 @@
|
||||
# An item that streamlines exiting scenes
|
||||
# An ESCExit is a minimal feature node that provides an exit to a room.
|
||||
#
|
||||
# For exits that don't require scripts, the ``ESCExit`` node is provided.
|
||||
# The only things you will need to configure on the node are the
|
||||
# "target_scene" to change to, and optionally, a "switch
|
||||
# sound" (the sound to play when changing rooms).
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# The game character will automatically walk to an ``ESCLocation`` created as a
|
||||
# child of an ``ESCExit`` node.
|
||||
extends ESCItem
|
||||
class_name ESCExit, "res://addons/escoria-core/design/esc_exit.svg"
|
||||
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
# ESCItem is a Sprite that defines an item, potentially interactive
|
||||
# An ``ESCItem`` defines a (usually interactive) item in the game.
|
||||
#
|
||||
# When interacting with an ``ESCItem``, the game character will automatically
|
||||
# walk to an ``ESCLocation`` that is created as a child of an ``ESCItem``.
|
||||
#
|
||||
# By selecting the "Is Exit" checkbox when you create an ``ESCItem``
|
||||
# node, Escoria will look for an ``:exit_scene`` event in the attached script file.
|
||||
# Any commands you place in the ``:exit_scene`` event will be run when the player
|
||||
# chooses to "use" the exit - for example, saying a goodbye, or running a
|
||||
# cutscene. Place a ``change_scene`` command inside this event to move the
|
||||
# character to the next room.
|
||||
tool
|
||||
extends Area2D
|
||||
class_name ESCItem, "res://addons/escoria-core/design/esc_item.svg"
|
||||
@@ -53,7 +63,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
|
||||
# preferred.
|
||||
export(bool) var is_exit
|
||||
|
||||
# If true, object is considered as trigger. Allows using :trigger_in and
|
||||
|
||||
Reference in New Issue
Block a user