private void Awake()
 {
     if (playerMatchManager == null)
     {
         playerMatchManager = GetComponent <PlayerMatchManager>();
     }
     animator = GetComponent <Animator>();
 }
Exemplo n.º 2
0
    private void InitializeLabels(Scene scene, LoadSceneMode mode)
    {
        if (scene.name == "Match")
        {
            //Find Player MatchManager on the scene for ClientHandleData
            //Have to search because we load new Scene
            currentMatchManager         = GameObject.Find("PlayerMatchManager").GetComponent <PlayerMatchManager>();
            currentMatchManager.matchID = currentMatchID;

            //Have to assign it here, cause we can find it only when level is alredy loaded
            ClientHandleData.playerMatchManager = currentMatchManager;
            ClientTCP.playerMatchManager        = currentMatchManager;


            //Initialize Labels:
            currentMatchManager.InitializeLabels(playerUsername, enemyUsername);
        }
    }
Exemplo n.º 3
0
 private void SetupFactories()
 {
     EndPointFactory.Initial();
     PlayerMatchManager.Initial();
     GameManager.Initial(new GameFactory());
 }