Пример #1
0
 public void InitializeGame()
 {
     DrawCard();
     DrawCard();
     DrawCard();
     DrawBtn.SetActive(true);
 }
Пример #2
0
 public void Start()
 {
     StageManager.Get().AddStage(new Stage(10, 10, "STAGE1", 5, 1, new List <MobType>()
     {
         MobType.None
     }));
     StageManager.Get().AddStage(new Stage(30, 30, "STAGE2", 5, 3, new List <MobType>()
     {
         MobType.DMGtoMinion
     }));
     StageManager.Get().AddStage(new Stage(100, 100, "STAGE3", 10, 5, new List <MobType>()
     {
         MobType.KillMinion
     }));
     Boss = StageManager.Get().GetNow().Boss;
     DrawBtn.SetActive(false);
     MinionList = new List <CardData>();
     MagicList  = new List <CardData>();
     GetComponent <XML_Parser>().ParseCard();
     Player = new Character(30, 30, "YOU");
     DrawUI();
     for (int i = 0; i < cardSlot.transform.childCount; i++)
     {
         Slot.Add(cardSlot.transform.GetChild(i).gameObject);
     }
 }
Пример #3
0
 public void OnClickedDraw()
 {
     if (!IsGameOver)
     {
         Player.NowHP -= 2;
         DrawCard();
         DrawUI();
         DrawBtn.SetActive(false);
         AttackBtn.SetActive(true);
     }
 }
Пример #4
0
 public void OnClickedAttack()
 {
     if (!IsGameOver)
     {
         DrawUI();
         DrawBtn.SetActive(true);
         AttackBtn.SetActive(false);
         for (int i = 0; i < Field.Count; i++)
         {
             Field[i].GetComponent <CardSlot>().Attack();
         }
         if (Boss.NowHP <= 0)
         {
             NextStage();
         }
         else
         {
             StageManager.Get().GetNow().TurnEnd();
         }
         DestroyDeadCard();
     }
 }