public void dropBeacon(ControlInput controller, ControlInput.ControllerDescription controllerObject, GameObject button, GameObject avatar, bool initialize = false) { if (!initialize) { TrolleyManager [] tm = Object.FindObjectsOfType <TrolleyManager> (); if (tm.Length == 0) { Debug.Log("Creating trolley "); GameObject thisTrolley = Instantiate(trolleyTemplate, transform.position + 0.0f * transform.forward, Quaternion.identity); } GameObject beacon = Instantiate(luggageBeaconTemplate, button.transform.position, button.transform.rotation); Destroy(beacon, 20.0f); LuggageSummonEventManager.summonLuggage(beacon); gameObject.SetActive(false); } }
// Start is called before the first frame update void Start() { trolley = this.gameObject; int maxBooks = 8; // limit to number of books carried. bookSlots = new BookPropertySet [maxBooks]; freeSlots = maxBooks; for (int i = 0; i < bookSlots.Length; i++) { bookSlots[i] = null; } base.Start(); LuggageSummonEventManager.listenSummonLuggage(track); restore(); }