Ejemplo n.º 1
0
        private void GetReward()
        {
            switch (type)
            {
            case Reward.Prop1:
                GameManager.AddProp1Num(num);
                UIManager.FlyReward(Reward.Prop1, num, transform.position);
                break;

            case Reward.Prop2:
                GameManager.AddProp2Num(num);
                UIManager.FlyReward(Reward.Prop2, num, transform.position);
                break;

            case Reward.Cash:
                Debug.LogError("奖励类型错误,该面板不会奖励现金");
                break;

            case Reward.Coin:
                GameManager.AddCoin(num);
                UIManager.FlyReward(Reward.Coin, num, transform.position);
                break;

            case Reward.Amazon:
                GameManager.AddAmazon(num);
                UIManager.FlyReward(Reward.Amazon, num, transform.position);
                break;

            case Reward.WheelTicket:
                GameManager.AddWheelTicket(num);
                UIManager.FlyReward(Reward.WheelTicket, num, transform.position);
                break;
            }
        }
Ejemplo n.º 2
0
 private void OnAdbuyCallback()
 {
     GameManager.AddEnergy(GameManager.addEnergyPerAd);
     GameManager.AddBuyEnergyTime();
     UIManager.FlyReward(Reward.Energy, GameManager.addEnergyPerAd, transform.position);
     UIManager.ClosePopPanel(this);
 }
Ejemplo n.º 3
0
 private void OnAdBuyCallback()
 {
     if (isProp1)
     {
         GameManager.AddProp1Num(1);
         GameManager.SendAdjustPropChangeEvent(1, 2);
         UIManager.FlyReward(Reward.Prop1, 1, coinBuyButton.transform.position);
     }
     else
     {
         GameManager.AddProp2Num(1);
         GameManager.SendAdjustPropChangeEvent(2, 2);
         UIManager.FlyReward(Reward.Prop2, 1, coinBuyButton.transform.position);
     }
     UIManager.ClosePopPanel(this);
 }
Ejemplo n.º 4
0
 private void OnCoinBuyClick()
 {
     GameManager.PlayButtonClickSound();
     GameManager.AddCoin(-needCoinNum);
     if (isProp1)
     {
         GameManager.AddProp1Num(1);
         UIManager.FlyReward(Reward.Prop1, 1, coinBuyButton.transform.position);
         GameManager.IncreaseByProp1NeedCoin();
         GameManager.SendAdjustPropChangeEvent(1, 1);
     }
     else
     {
         GameManager.AddProp2Num(1);
         UIManager.FlyReward(Reward.Prop2, 1, coinBuyButton.transform.position);
         GameManager.IncreaseByProp2NeedCoin();
         GameManager.SendAdjustPropChangeEvent(2, 1);
     }
     UIManager.ClosePopPanel(this);
 }
Ejemplo n.º 5
0
 private void OnAdBuyProp2Callback()
 {
     GameManager.AddProp2Num(1);
     GameManager.SendAdjustPropChangeEvent(2, 2);
     UIManager.FlyReward(Reward.Prop2, 1, transform.position);
 }
Ejemplo n.º 6
0
 private void OnAdGetCallback()
 {
     GameManager.AddCash(rewardNum);
     UIManager.FlyReward(Reward.Cash, rewardNum, transform.position);
     UIManager.ClosePopPanel(this);
 }