Ejemplo n.º 1
0
 public void InitializeGame()
 {
     DrawCard();
     DrawCard();
     DrawCard();
     DrawBtn.SetActive(true);
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 3
0
 public void OnClickedDraw()
 {
     if (!IsGameOver)
     {
         Player.NowHP -= 2;
         DrawCard();
         DrawUI();
         DrawBtn.SetActive(false);
         AttackBtn.SetActive(true);
     }
 }
Ejemplo n.º 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();
     }
 }