Beispiel #1
0
        public void Initialize()
        {
            var _coroutineOwnerGameObject = new GameObject("DBModel_CoroutineOwner");

            _coroutineOwnerGameObject.AddComponent <CoroutineOwner>();
            _co = _coroutineOwnerGameObject.GetComponent <CoroutineOwner>();
        }
Beispiel #2
0
        public void Initialize()
        {
            PhotonNetwork.sendRate            = 60;
            PhotonNetwork.sendRateOnSerialize = 50;

            Models.Get <IGamestateModel>().StateChanged    += OnGamestateChanged;
            Models.Get <IArenaModel>().PedestalsConfigured += OnPedestalsConfigured;

            _photonRelay = GameObject.FindObjectOfType <PhotonRelay>() as IPhotonRelay;
            _photonRelay.ConnectedToMaster      += OnConnectedToMaster;
            _photonRelay.JoinedLobby            += OnJoinedLobby;
            _photonRelay.CreatedRoom            += OnCreatedRoom;
            _photonRelay.JoinedRoom             += OnJoinedRoom;
            _photonRelay.ReceivedRoomListUpdate += OnReceivedRoomListUpdate;
            _photonRelay.JoinRoomFailed         += OnJoinRoomFailed;
            _photonRelay.PlayerConnected        += OnPlayerConnected;
            _photonRelay.PlayerDisconnected     += OnPlayerDisconnected;
            _photonRelay.ReadyCheckFinished     += OnReadyCheckFinished;
            _photonRelay.Disconnected           += OnDisconnectedFromPhoton;
            _photonRelay.LeftRoom     += OnLeftRoom;
            _photonRelay.GameFinished += OnGameFinished;
            _photonRelay.PlayerDied   += OnPlayerDied;

            _roomBlacklist = new HashSet <string>();

            var _coroutineOwnerGameObject = new GameObject("NetworkModel_CoroutineOwner");

            _coroutineOwnerGameObject.AddComponent <CoroutineOwner>();
            _co = _coroutineOwnerGameObject.GetComponent <CoroutineOwner>();
        }
Beispiel #3
0
        public void Initialize()
        {
            _processInputs = false;
            _pendingDamage = false;

            var go = new GameObject("NetPlayerModel_CoroutineOwner");

            _co = go.AddComponent <CoroutineOwner>();

            Models.Get <IGamestateModel>().StateChanged        += OnGamestateChange;
            Models.Get <INetworkModel>().RoomFilled            += OnRoomFilled;
            Models.Get <IArenaModel>().PedestalsConfigured     += OnPedestalsConfigured;
            Models.Get <IShuttersModel>().ShutterTransitionEnd += OnShuttersTransitionEnd;
        }