Game Development Reference
In-Depth Information
18.
19.
//Try all keys in the inventory box with the lock
20.
col.gameObject.SendMessage("Unlock",
21.
box.keys, //Colletion of keys to try
22.
SendMessageOptions.DontRequireReceiver);
23.
24.
}
25.
26.}
Listing 65: A script that tries to unlock the door when the player touches it
Search WWH ::




Custom Search