示例#1
0
    private void OnMouseOver()
    {
        if (Input.GetMouseButtonDown(1))
        {
            if (myMarketSlot != null)
            {
                myMarketSlot.rightMouseDownFunc();
            }
        }
        if (Input.GetKeyDown(KeyCode.F) && myUnit.isFriendly && gc.ctrl >= 8 && myUnit.timesBuffed < 3)
        {
            gc.ctrl -= 8;
            GameObject myPopMan = Instantiate(popMan, gameObject.transform.position, Quaternion.identity);
            myUnit.curAtk++;

            myUnit.curHealth++;
            myUnit.maxHealth++;
            myUnit.timesBuffed++;
            if (myUnit.timesBuffed == 3)
            {
                myUnit.curDef++;
            }
            refreshText();
            StartCoroutine(makeThePop(myPopMan));
        }
    }
示例#2
0
 void OnMouseOver()
 {
     showText();
     if (myMarketSlot != null)
     {
         myMarketSlot.mouseOverFunc();
         if (Input.GetMouseButtonDown(1))
         {
             myMarketSlot.rightMouseDownFunc();
         }
     }
     if (mySlot != null)
     {
         gc.mouseOverSlotFunc(mySlot);
         if (Input.GetMouseButtonDown(1))
         {
             gc.rightMouseSlotFunc(mySlot);
         }
     }
 }