void PlayerPickUpKey(UnitInventory aInventory) { aInventory.AddItem(ItemDatabase.QueryItem(ItemType.SILVER_ACCESS_CARD)); }
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>(); }