public override void OnStartClient()
        {
            DontDestroyOnLoad(gameObject);

            room = FindObjectOfType <NetworkManagerHex>();
            room.AddGamePlayer(this);
        }
        private void SetupReferences()
        {
            room = FindObjectOfType <NetworkManagerHex>();

            var menu = FindObjectOfType <MainMenu>();

            lobbyUI = menu.Lobby;
        }
Exemple #3
0
        public void SetDependencies(Dependencies dependencies)
        {
            if (!dependencies.IsValid())
            {
                Debug.LogError("Tried to setup with invalid dependencies");
                // TODO exit to menu?
                return;
            }

            room = dependencies.NetworkManager;
            Data = dependencies.Data;
            Grid = dependencies.Grid;

            Data.Init(this, config);
            Grid.Init(this);
            Cells.Init(this, Grid);

            StartCoroutine(AwaitNetworkedPlayerRoutine());
        }
Exemple #4
0
 public override void OnStartClient()
 {
     room = FindObjectOfType <NetworkManagerHex>();
     room.RegisterGameData(this);
 }