コード例 #1
0
 void UpdateUpgradeUI()
 {
     //if there is an upgraded combo switch the image of that upgrade to a filled circle.
     for (int i = 0; i < m_AmountOfUpgrades; i++)
     {
         if (pData_.m_UnlockedCombinedCombos[i] == true)
         {
             m_CombinedComboImages[i].sprite = m_FilledJewel;
         }
         if (pData_.m_UnlockedProjectileCombos[i] == true)
         {
             m_ProjectileImages[i].sprite = m_FilledJewel;
         }
         if (pData_.m_UnlockedMeleeCombos[i] == true)
         {
             m_MeleeImages[i].sprite = m_FilledJewel;
         }
     }
     m_Health.text       = "Player Health: " + pData_.m_PlayerHealth.ToString();
     m_Speed.text        = "Player Speed: " + pData_.m_MaxSpeed.ToString("F1"); //'F1' makes it one decimal
     m_Currency.text     = "Currency Scalar: " + pData_.m_CurrencyScalar.ToString();
     m_FireRate.text     = "Fire Rate: " + pData_.m_FireRate.ToString("F1");    //'F1' makes it one decimal
     m_Damage.text       = "Player Damage: " + pData_.m_PlayerDamage.ToString();
     m_Punch.text        = "Melee Damage: " + pData_.m_PunchDamage.ToString();
     m_HealthCost.text   = "Health: " + HealthCost.ToString() + " beans";
     m_CurrencyCost.text = "Currency: " + CurrencyCost.ToString() + " beans";
     m_FireRateCost.text = "Fire Rate: " + AttackRateCost.ToString() + " beans";
     m_DamageCost.text   = "P-Damage: " + DamageCost.ToString() + " beans";
     m_PunchCost.text    = "M-Damage: " + MeleeCost.ToString() + " beans";
     m_SpeedCost.text    = "Speed: " + SpeedCost.ToString() + " beans";
     m_PComboCost.text   = "P-Combo: " + projectileComboCost_[projectileCounter_].ToString() + " beans";
     m_MComboCost.text   = "M-Combo: " + meleeComboCost_[meleeCounter_].ToString() + " beans";
     m_CComboCost.text   = "C-Combo: " + multiComboCost_[combinedComboCounter_].ToString() + " beans";
     m_PlayerMoney.text  = "Player Beans: " + pData_.m_Currency.ToString();
 }
コード例 #2
0
ファイル: Estate.cs プロジェクト: ahenrique23/GameEstudo
 public bool RemoveCurrency(CurrencyCost cost, float discount)
 {
     Currencies[cost.Type] -= Mathf.RoundToInt(cost.Amount * discount);
     return(true);
 }
コード例 #3
0
ファイル: Estate.cs プロジェクト: ahenrique23/GameEstudo
 public bool RemoveCurrency(CurrencyCost cost)
 {
     Currencies[cost.Type] -= cost.Amount;
     return(true);
 }
コード例 #4
0
ファイル: Estate.cs プロジェクト: ahenrique23/GameEstudo
 public bool CanPayPrice(CurrencyCost cost)
 {
     return(Currencies[cost.Type] >= cost.Amount);
 }
コード例 #5
0
 public CurrencyCost(CurrencyCost clone)
 {
     Type   = clone.Type;
     Amount = clone.Amount;
 }
コード例 #6
0
 public bool CanPayPrice(CurrencyCost cost, float discount)
 {
     return(Currencies[cost.Type].amount >= cost.Amount * discount);
 }