Exemplo n.º 1
0
 void Start()
 {
     Enemystat = gameObject.GetComponent <EnemyScripts>();
     csc       = gameObject.GetComponent <Cardsc>();
     batsys    = gameObject.GetComponent <BattleSystem>();
     sm        = gameObject.GetComponent <Sommon>();
     ma        = gameObject.GetComponent <MobAnime>();
     Lookimg   = LookCard.GetComponent <Image>();
     Power     = Powergo.GetComponent <Text>();
     HP        = HPgo.GetComponent <Text>();
     SommonMonster[0].SetActive(false);
     SommonMonster[1].SetActive(false);
     SommonMonster[2].SetActive(false);
     StatusNBuff[0].SetActive(false);
     StatusNBuff[1].SetActive(false);
     StatusNBuff[2].SetActive(false);
     Sommoned[0]   = false;
     Sommoned[1]   = false;
     Sommoned[2]   = false;
     ons           = false;
     isOn          = false;
     mobAttackturn = 0;
     Updating();
     StartSommonEnemy();
 }
Exemplo n.º 2
0
 private void Start()
 {
     batsys  = gameObject.GetComponent <BattleSystem>();
     Lookimg = LookCard.GetComponent <Image>();
     rts     = Arrows.GetComponent <RectTransform>();
     ab      = gameObject.GetComponent <AnemyBattle>();
     ma      = gameObject.GetComponent <MobAnime>();
     csc     = gameObject.GetComponent <Cardsc>();
     Dm      = gameObject.GetComponent <DamageSystem>();
     Power   = Powergo.GetComponent <Text>();
     HP      = HPgo.GetComponent <Text>();
     SommonMonster[0].SetActive(false);
     SommonMonster[1].SetActive(false);
     SommonMonster[2].SetActive(false);
     Sommoned[0] = false;
     Sommoned[1] = false;
     Sommoned[2] = false;
     StatusNBuff[0].SetActive(false);
     StatusNBuff[1].SetActive(false);
     StatusNBuff[2].SetActive(false);
     BuffExp.SetActive(false);
     ons       = false;
     isOn      = false;
     Seleting  = false;
     isExplain = false;
     xpos      = 0f;
     Updating();
 }
Exemplo n.º 3
0
    void Start()
    {
        Energy    = 3;
        maxEnergy = Energy;
        Color color = Announce.color;

        color.a        = 0;
        Announce.color = color;
        AATC           = 0;
        CopyState();
        DeckSame();
        AnemyBattle anemyBattle = GameObject.Find("Systems").GetComponent <AnemyBattle>();

        ue  = gameObject.GetComponent <UIEffect>();
        csc = gameObject.GetComponent <Cardsc>();

        sommon = gameObject.GetComponent <Sommon>();
        for (int i = 0; i < 10; i++)
        {
            CardImage[i].SetActive(false);
        }
        StartCoroutine("FirstTurnDrow");
    }
Exemplo n.º 4
0
    public void CardDraw()
    {
        csc.CardReloading();

        int b = Random.Range(0, deckcards - 1);

        if (BDeck[b].Cards != null)
        {
            for (int j = 0; j < 10; j++)
            {
                if (Hand[j].Cards == null)
                {
                    Cardsc csc = gameObject.GetComponent <Cardsc>();
                    Hand[j]           = BDeck[b];
                    csc.Costs[j].text = "" + Hand[j].CardsRCost;
                    csc.Power[j].text = "" + Hand[j].CardsRPower;
                    Text tx = csc.HPgo[j].GetComponent <Text>();
                    tx.text               = "" + Hand[j].CardsRHP;
                    BDeck[b].Cards        = null;
                    BDeck[b].CardsOGCost  = 0;
                    BDeck[b].CardsRCost   = 0;
                    BDeck[b].CardsOGPower = 0;
                    BDeck[b].CardsRPower  = 0;
                    BDeck[b].CardsOGHP    = 0;
                    BDeck[b].CardsRHP     = 0;
                    CardReload(b);
                    HandCount++;
                    ue.CardDrowEffect(j + 1);
                    HandCard();
                    deckcards--;
                    break;
                }
                else if (Hand[9].Cards != null)
                {
                    BDeck[b].Cards        = null;
                    BDeck[b].CardsOGCost  = 0;
                    BDeck[b].CardsRCost   = 0;
                    BDeck[b].CardsOGPower = 0;
                    BDeck[b].CardsRPower  = 0;
                    BDeck[b].CardsOGHP    = 0;
                    BDeck[b].CardsRHP     = 0;
                    Announce.text         = "카드를 더 이상 뽑을 수 없어 카드가 소멸됩니다.";
                    StopCoroutine("AnnounceAppear");
                    StopCoroutine("AnnounceDisappear");
                    AATC = 0;
                    StartCoroutine("AnnounceAppear");
                    CardReload(b);
                    deckcards--;
                    break;
                }
            }
        }
        else if (BDeck[0].Cards == null)
        {
            Announce.text = "덱에 카드가 없어 피해를 받습니다!";
            StopCoroutine("AnnounceAppear");
            StopCoroutine("AnnounceDisappear");
            AATC = 0;
            StartCoroutine("AnnounceAppear");
        }


        for (int i = 0; i < 10; i++)
        {
            if (Hand[i].Cards != null)
            {
                if (Hand[i].CardsRCost <= Energy)
                {
                    CarduseCant = false;
                    break;
                }
            }
            else
            {
                CarduseCant = true;
                break;
            }
        }
    }