Example #1
0
    // Use this for initialization
    void OnAwake()
    {
        candyManager = GameObject.Find ("CandyBag").GetComponent<CandyBag> ();

        if (candyManager == null) {
            Debug.LogWarning("No Candy Manager found for Lollipop!");
        }
    }
Example #2
0
 public Player()
 {
     avatar   = new Avatar();
     bag      = new Bag();
     candyBag = new CandyBag();
     contact  = new Contact();
     info     = new Info();
     currency = new Currency(this);
     tutorial = new Tutorial();
 }
Example #3
0
        public CandyIterator(CandyBag collection, bool reverse = false)
        {
            this._collection = collection;
            this._reverse    = reverse;

            if (reverse)
            {
                this._position = collection.GetItems().Count;
            }
        }
Example #4
0
 // Use this for initialization
 void Start()
 {
     cb = GameObject.Find ("CandyBag").GetComponent<CandyBag> ();
 }
Example #5
0
 void Start()
 {
     seeker = GetComponent<Seeker>();
     controller = GetComponent<CharacterController>();
     backpack = GetComponent<CandyBag>();
     if (backpack == null)
         backpack = gameObject.AddComponent <CandyBag>( ) as CandyBag;
 }