Update Script API

Registers:
key
Used in determining what keys are down and when.
grounded
Will change based on if the object is on the ground when IsGrounded gets called.
touch
Unlike the other two registers, touch actually holds a reference to another object.
-----------------------
Functions:
Registers Setters
KeyPressed
Takes one parameter in the form of a character, such as 'a', or 'b', and sets the key register
when the key is pressed. This only works with letters, so numbers and other characters will fail.
KeyJustPressed
Takes one parameter in the form of a character, such as 'a', or 'b', and sets the key register
the frame the key is pressed. This only works with letters, so numbers and other characters will fail.
KeyJustReleased
Takes one parameter in the form of a character, such as 'a', or 'b', and sets the key register
the frame the key is released. This only works with letters, so numbers and other characters will fail.
GetTouch
Takes one parameter in the form of an integer. This parameter tells the function what type of tag to look for.
For example, "GetTouch 1" would set the touch register with any touching object that has a tag of 1.
A parameter value of -1 will search for all tags.
IsGrounded
Takes no parameters, and sets the grounded register based on if the object is touching the floor beneath it.
Interactables
Push
Takes two parameters in the form of numbers. The object gets pushed in the X direction based on the
first parameter, and the Y direction based on the second parameter. This is in relation to world space
PushLocal
Takes two parameters in the form of numbers. The object gets pushed in the X direction based on the
first parameter, and the Y direction based on the second parameter. This is in relation to local space
Velocity
Takes two parameters in the form of numbers. The object gets its velocity set to the X direction based on the
first parameter, and the Y direction based on the second parameter. This is in relation to world space
VelocityLocal
Takes two parameters in the form of numbers. The object gets its velocity set to the X direction based on the
first parameter, and the Y direction based on the second parameter. This is in relation to local space
Teleport
Takes two parameters in the form of numbers. The object gets its position set to X, Y based on the
first parameter and the second parameter, respectively. This is in relation to world space
Rotate
Takes one parameters in the form of a number. The object gets its rotation set to this value.
DestroySelf
Takes no parameters. Destroys the object and ends the Update Script.
DestroyTouch
Takes no parameters. Destroys the object in the touch register.
Reset
Takes no parameters. Resets the game world.
WinGame
Takes no parameters. Displays a Victory pop-up and resets the game.
LoseGame
Takes no parameters. Displays a Loss pop-up and resets the game.