// Use this for initialization void OnAwake() { candyManager = GameObject.Find ("CandyBag").GetComponent<CandyBag> (); if (candyManager == null) { Debug.LogWarning("No Candy Manager found for Lollipop!"); } }
public Player() { avatar = new Avatar(); bag = new Bag(); candyBag = new CandyBag(); contact = new Contact(); info = new Info(); currency = new Currency(this); tutorial = new Tutorial(); }
public CandyIterator(CandyBag collection, bool reverse = false) { this._collection = collection; this._reverse = reverse; if (reverse) { this._position = collection.GetItems().Count; } }
// Use this for initialization void Start() { cb = GameObject.Find ("CandyBag").GetComponent<CandyBag> (); }
void Start() { seeker = GetComponent<Seeker>(); controller = GetComponent<CharacterController>(); backpack = GetComponent<CandyBag>(); if (backpack == null) backpack = gameObject.AddComponent <CandyBag>( ) as CandyBag; }