Beispiel #1
0
 void Buy(float price, GUN gunType, Text priceText)
 {
     if (StaticData.PlayerMoney >= price)
     {
         StaticData.PlayerMoney -= price;                       //收钱
         PlayerMoneyShow(StaticData.PlayerMoney);               //刷新金钱显示
         OwnList.Add(gunType, false);                           //交货
         priceText.text = "已拥有";                                //标记为已拥有
         hintPanel.Open();
         hintPanel.SetHint("再次点击按钮装备此枪支");
     }
 }
Beispiel #2
0
 /// <summary>
 /// 点击开始游戏时调用
 /// </summary>
 public void OnClickStartButton()
 {
     //播放点击音效
     AudioManager.Instance.PlayClickButtonClip(UIAS);
     if (GunManager.useGun.Count == 0)
     {
         hintPanel.Open();
         hintPanel.SetHint("请带吧枪啊!");
         return;
     }
     LoadScene.loadScene("ShootGame");
 }