コード例 #1
0
 void FingerSlap()
 {
     if (mouseWeapon.GetMouseHitPower() != 0)
     {
         SpawnCurrency(mouseWeapon.GetPower(), mouseWeapon.GetMouseHitPower());
     }
 }
コード例 #2
0
    void SetListeners()
    {
        Upgrade.onClick.AddListener(delegate {
            if (!HasEnoughMoney() || mouseWeapon.cursorID == PrefabManager.E_WEAPON.CHAINSAW)
            {
                return;
            }
            gameActionManager.money -= GetWeaponPrice(mouseWeapon.cursorID + 1);
            mouseWeapon.SetSprite(++mouseWeapon.cursorID);
            mouseWeapon.SetPower(mouseWeapon.GetPower() + 1);
            //automatically close shop after buying
            gameObject.active = false;
            mouseWeapon.SetCursorMode(false);
            puppet.PuppetVisibility(true);
        });

        Exit.onClick.AddListener(delegate {
            gameObject.active = false;
            mouseWeapon.SetCursorMode(false);
            puppet.PuppetVisibility(true);
        });
    }