Ejemplo n.º 1
0
 void PlayerPickUpKey(UnitInventory aInventory)
 {
     aInventory.AddItem(ItemDatabase.QueryItem(ItemType.SILVER_ACCESS_CARD));
 }
Ejemplo n.º 2
0
        protected virtual void Start()
        {
            UnitManager.Register(this);

            List<Ability> abilities = new List<Ability>();
            IEnumerator<Ability> iter = m_Abilities.GetEnumerator();
            while(iter.MoveNext())
            {
                if(iter.Current == null)
                {
                    continue;
                }
                abilities.Add(Instantiate(iter.Current) as Ability);
            }

            m_Abilities = abilities;
            UpdateAbilityReferences();
            if (m_Abilities.Count > 0)
            {
                m_SelectedAbility = m_Abilities[0];
            }
            m_Inventory = GetComponent<UnitInventory>();
        }