예제 #1
0
 void DrawPhase()
 {
     Debug.Log("DrawPhase");
     // カードのドロー
     currentPlayer.Draw();
     phase         = Phase.STANDBY;
     current_phase = "DrawPhase";
     if (currentPlayer != playerList[1])
     {
         current_player = "自分";
     }
     else
     {
         current_player = "相手";
     }
     turn += 1;
 }
예제 #2
0
    void InitPhase()
    {
        Debug.Log("InitPhase");
        // デッキの生成
        Debug.Log("player1CardDataList" + player1CardDataList[1]);
        Debug.Log("player2CardDataList" + player2CardDataList[1]);
        Debug.Log("playerList[0].deck:" + currentPlayer.x);
        Debug.Log("playerList[0].deck" + waitPlayer.y);

        /*
         * deckGenerater.Generate(player1CardDataList, playerList[0].deck);
         * deckGenerater.Generate(player2CardDataList, playerList[1].deck);
         */
        deckGenerater.Generate(player1CardDataList, currentPlayer.deck);
        deckGenerater.Generate(player2CardDataList, waitPlayer.deck);
        manaGenerater.Generate(ManacardDataList1, currentPlayer.mana);
        manaGenerater.Generate(ManacardDataList2, waitPlayer.mana);
        diceGenerater.Generate(DiceDataList);
        //diceGenerater.Generate(DiceDataList, waitPlayer.mana);

        // 現在のプレイヤー
        currentPlayer = playerList[0];
        waitPlayer    = playerList[1];

        coroutine = PhaseChange(false);
        Coroutine retA = StartCoroutine(coroutine);

        phase          = Phase.DRAW;
        current_phase  = "InitPhase";
        current_player = "自分";
        // ゲーム開始時に手札をセット
        for (int i = 0; i < 5; i++)
        {
            currentPlayer.Draw();
            waitPlayer.Draw();
        }
    }