Exemplo n.º 1
0
    public void GameInit()
    {
        curCoroutine = null;
        IsTestMode   = false;
        createPos.SetActive(false);

        ChracterList.Clear();
        PlayerDataList.Clear();
        PlayerSequenceQueue.Clear();

        IsGameEnd = false;
        CurRound  = 1;

        Player1 = new PlayerData(0, 0, Team.PLAYER1, DeckManager.Instance.CurDeck);
        Player2 = new PlayerData(1, 1, Team.PLAYER2, DeckManager.Instance.CurDeck);

        PlayerDataList.Add(Player1);
        PlayerDataList.Add(Player2);

        PlayerDataList.Sort((x, y) =>
        {
            return(x.order.CompareTo(y.order));
        });

        foreach (var player in PlayerDataList)
        {
            EnqueuePlayerSequenceQueue(player);
        }

        NextSequencePlayerStart();
    }
Exemplo n.º 2
0
    public void RemoveAllData()
    {
        foreach (var player in ChracterList)
        {
            player.RemoveCharacterPhysics();
            Destroy(player.gameObject);
        }
        ChracterList.Clear();

        CurrentCharacter = null;

        TestCharacterCreateDataList.Clear();
    }
Exemplo n.º 3
0
    public void TestSceneReset()
    {
        foreach (var player in ChracterList)
        {
            player.RemoveCharacterPhysics();
            Destroy(player.gameObject);
        }
        ChracterList.Clear();

        CurrentCharacter = null;

        foreach (var data in TestCharacterCreateDataList)
        {
            CreateCharacter(data);
        }

        var sweepUI = UIManager.Instance.IsUIOpened <SweepUI>();

        if (sweepUI != null)
        {
            sweepUI.Close();
        }
    }