コード例 #1
0
        public override void OnStartClient()
        {
            DontDestroyOnLoad(gameObject);

            room = FindObjectOfType <NetworkManagerHex>();
            room.AddGamePlayer(this);
        }
コード例 #2
0
        private void SetupReferences()
        {
            room = FindObjectOfType <NetworkManagerHex>();

            var menu = FindObjectOfType <MainMenu>();

            lobbyUI = menu.Lobby;
        }
コード例 #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());
        }
コード例 #4
0
 public override void OnStartClient()
 {
     room = FindObjectOfType <NetworkManagerHex>();
     room.RegisterGameData(this);
 }