Ejemplo n.º 1
0
 public void TapButtonCoinEnter()
 {
     if (EnterCoinGateSensorControllerInstance.IsCoinNothing() == true)
     {
         if (CreditManagerInstance.IsCoinEnterPermited() == true) //Creditあるか確認
         {                                                        //あるなら
             createCoin();                                        //コイン生成
             CreditManagerInstance.SubtractCredit();              //クレジット--
         }
     }
 }
Ejemplo n.º 2
0
 public void GenerateBall()
 {
     if ((CreditManagerInstance.IsCreditZero() == false) &&
         (IsPermitGenerate == true))
     {
         IsPermitGenerate = false;                     //ポケットに入った後の一通りのアクションが終わるまでfalse(BingoMasuControllerからセット関数が呼ばれる)
         GameObject ballPrefab  = decidePrefab();      //ランダムで何色のボールにするか決める
         Vector3    generatePos = decideGeneratePos(); //生成座標を決める
         Instantiate(ballPrefab, generatePos, Quaternion.identity);
         CreditManagerInstance.SubtractCredit(1);
     }
 }
Ejemplo n.º 3
0
    void UpgradeLightningBolt()
    {
        if (upgrade1Level < maxUpgrade)
        {
            upgrade1Level += 1;

            displayManager.DisplayMessage("Lightning Bolt: Level " + upgrade1Level);

            secondaryWeaponGameObject.GetComponentInChildren <ShootAttack>().shootRange =
                Mathf.RoundToInt(secondaryWeaponGameObject.GetComponentInChildren <ShootAttack>().shootRange * 2f);

            secondaryWeaponGameObject.GetComponentInChildren <LightningWeapon>().damage =
                Mathf.RoundToInt(secondaryWeaponGameObject.GetComponentInChildren <LightningWeapon>().damage * 2f);

            secondaryWeaponGameObject.GetComponentInChildren <LightningWeapon>().energyCostPerc =
                secondaryWeaponGameObject.GetComponentInChildren <LightningWeapon>().energyCostPerc + 0.005f;

            if (upgrade1Level == 2)
            {
                lightningBoltGameObject.GetComponent <LightningBoltPrefabScript>().GlowTintColor = new Color(1, 0.92f, 0.016f, 1);
            }

            if (upgrade1Level == 3)
            {
                lightningBoltGameObject.GetComponent <LightningBoltPrefabScript>().GlowTintColor = new Color(0, 1, 0, 1);
            }

            if (upgrade1Level == 4)
            {
                lightningBoltGameObject.GetComponent <LightningBoltPrefabScript>().GlowTintColor = new Color(0, 0, 1, 1);
            }

            if (upgrade1Level == 5)
            {
                lightningBoltGameObject.GetComponent <LightningBoltPrefabScript>().GlowTintColor = new Color(1, 0, 1, 1);
            }

            if (upgrade1Level == 6)
            {
                lightningBoltGameObject.GetComponent <LightningBoltPrefabScript>().GlowTintColor = new Color(1, 0, 0, 1);
            }

            creditManager.SubtractCredit(upgradeCost);
            upgradeCost = Mathf.RoundToInt(upgradeCost * 3f);

            upgradeButtonCostText(upgrade1Level, maxUpgrade);
            currentUpgradeLevelText.text = upgrade1Level.ToString();
        }
        else
        {
            upgradeButtonCostText(upgrade1Level, maxUpgrade);
        }
    }