Esempio n. 1
0
        private void OnTriggerEnter(Collider other)
        {
            switch (other.gameObject.tag)
            {
            case "Experience":
                Destroy(other.gameObject);
                AddExperience((uint)(LevelSetupper.GetLevelSetupper().GainExperience *other.gameObject.transform.localScale.x));
                break;

            case "CenterOfTarget":
                Win(10);
                break;

            case "SecondCenterOfTarget":
                Win(6);
                break;

            case "ThirdCenterOfTarget":
                Win(4);
                break;

            case "Bomb":
                Destroy(other.gameObject);
                DeathFromBomb();
                break;

            case "Coin":
                m_wallet.AddMoney(LevelSetupper.GetLevelSetupper().GainMoney *(uint)other.transform.localScale.x);
                break;

            case "GigaCoin":
                m_wallet.AddMoney(LevelSetupper.GetLevelSetupper().GainMoney *(uint)other.transform.localScale.x * 2);
                break;
            }
        }
Esempio n. 2
0
        public override CannonballDataContainer GetDataForSave()
        {
            CannonballDataContainer data = new CannonballDataContainer();

            data.Experience          = m_player.Experience;
            data.Money               = m_playerWallet.MoneyCount;
            data.CurrentLevelOfScene = LevelSetupper.GetLevelSetupper().CurrentLevel;
            return(data);
        }
Esempio n. 3
0
 public override void LoadData(CannonballDataContainer data)
 {
     m_player.Experience       = data.Experience;
     m_playerWallet.MoneyCount = data.Money;
     LevelSetupper.GetLevelSetupper().CurrentLevel = data.CurrentLevelOfScene;
 }
Esempio n. 4
0
 private void Win(uint multiplayerValue)
 {
     AddExperience(LevelSetupper.GetLevelSetupper().GainExperience *multiplayerValue);
     OnWin?.Invoke();
 }