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;
        }
Beispiel #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());
        }
Beispiel #4
0
 public override void OnStartClient()
 {
     room = FindObjectOfType <NetworkManagerHex>();
     room.RegisterGameData(this);
 }