예제 #1
0
    public void Heal()
    {
        HealPot h = new HealPot("", 0, 0, 0, false, false, 25, 6);

        h.RegisterHealPotAction(ItemActions.HealPotAct);
        h.Use();
    }
예제 #2
0
    protected HealPot(HealPot other) : base(other)
    {
        this.healPotAction = other.healPotAction;

        this.maxHealValue = other.maxHealValue;

        this.healingTime = other.healingTime;
    }
예제 #3
0
    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;
    }
예제 #4
0
    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);
    }
예제 #5
0
    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();
    }