Ejemplo n.º 1
0
    void Shoot()
    {
        SceenShake.ShakeScreen(0.02f);
        Instantiate(rockets[curRockets], transform.position, Quaternion.identity);
        BackGroundSetting.FundsComsumed(bulletCost);

        boom.pitch = 1 * Random.Range(0.8f, 1.2f);
        boom.Play();
    }
Ejemplo n.º 2
0
    public void Buy(int num)
    {
        int tempPrice = priceSave[num, levelSave[num]];

        if (tempPrice != 0 && BackGroundSetting.curFunds >= tempPrice)
        {
            BackGroundSetting.FundsComsumed(tempPrice);
            levelSave[num]++;
            UpdatePrice(num);

            switch (num)
            {
            case 0:
                wallObj.GetComponent <wallManager>().UpgradeWall(levelSave[num]);
                break;

            case 1:
                grinderObj.GetComponent <meatGrinder>().UpgradeGrinder(grinderScaleVaule[levelSave[num]], 2f);
                break;

            case 2:
                handObj.GetComponent <mouseCtrl>().UpgradeGrabHand(handScaleValue[levelSave[num]]);
                break;

            case 3:
                gunObj.GetComponent <gun>().UpdateGunLevel(gunFireRate[levelSave[num]], 10);
                break;

            case 4:
                rpgObj.GetComponent <RPG>().UpdateRPGLevel(rpgFireRate[levelSave[num]], levelSave[num]);
                break;

            default:
                break;
            }
        }
    }
Ejemplo n.º 3
0
 void Shoot()
 {
     SceenShake.ShakeScreen(0.005f);
     Instantiate(bullets, transform.position, Quaternion.identity);
     BackGroundSetting.FundsComsumed(bulletCost);
 }