public void Heal() { HealPot h = new HealPot("", 0, 0, 0, false, false, 25, 6); h.RegisterHealPotAction(ItemActions.HealPotAct); h.Use(); }
protected HealPot(HealPot other) : base(other) { this.healPotAction = other.healPotAction; this.maxHealValue = other.maxHealValue; this.healingTime = other.healingTime; }
public static void HealPotAct(HealPot h) { //Bazı kodlar geçici olacağı için açıklamalrı türkçe yapıyorum //Eğer biz bir pot kullanmış isek iyileşme süreci başlamış demektir //ve hangi pot bizi iyileştiriyor bu bilgiye ihtiyacımız olacak bunu almanın en iyi yolu bu olmayabilir currentHealPot = h; healing = true; }
void Start() { this._slotAmount = 45; this._slotPanel = this.gameObject.transform.FindChild("Slot Panel").gameObject; test(); //TODO for(int i = 0; i < this._slotAmount; i++) { Pair<GameObject, bool> ZIZI = new Pair<GameObject, bool>(); ZIZI.First = Instantiate(this._inventorySlot); ZIZI.Second = true; this._slots.Add(ZIZI); this._slots[i].First.GetComponent<Slot>()._id = i; this._slots[i].First.transform.SetParent(this._slotPanel.transform); } AffAllItems(); PeonSword FDP = new PeonSword(); FDP.init(); AddItem(FDP); HealPot FDP2 = new HealPot(); FDP2.init(); AddItem(FDP2); }
public void test() { AItem i; i = new HealPot (); i.init (); this._items.Add(new Pair<AItem, int>(i, 2)); AItem it; it = new HealPot (); it.init (); this._items.Add(new Pair<AItem, int>(it, 2)); AItem itt; itt = new HealPot (); itt.init (); this._items.Add(new Pair<AItem, int>(itt, 2)); this._iList = new InventoryItems(); }