Game Development Reference
In-Depth Information
a list of keys, and the state
locked
is not changed to
false
unless one of these keys matches
unlockKey
. The question now is how to make use of these functions to make an ac-
tual sliding door? The answer is simple: we make another script that continuously calls
IsOpen()
and
IsClose()
and consequently modifies the position of the door towards open
or close positions. This script is
SlidingDoor
shown in Listing 67.