public void OnWaitingForDirectionInput(BasePlayerMover mover) { foreach (IPlayerRoomEventListener listener in IterateListeners<IPlayerRoomEventListener>()) { listener.OnWaitingForInput(mover); } }
public void OnPostRoomEvent(BasePlayerMover mover, RoomObject room) { foreach (IPlayerRoomEventListener listener in IterateListeners<IPlayerRoomEventListener>()) { listener.OnPostRoomEvent(mover, room); } }
public void OnWaitingForInput(BasePlayerMover mover) { }
public void OnPostRoomEvent(BasePlayerMover mover, RoomObject room) { }
public void OnPreRoomEvent(BasePlayerMover mover, RoomObject room) { _playIdleAnimations(); }
public void OnExitRoom(BasePlayerMover mover, RoomObject room) { }
public void OnEnteredRoom(BasePlayerMover mover, RoomObject room) { }
public override void OnStartOwner(bool wasSpawn) { if (!m_hasStarted) { //Startup the map manager m_mapManager = GetComponent<MapManager>(); m_mapManager.GenerateMap(); RoomObject startRoom = m_mapManager.PlaceStartRoom(); //Spawn the player mover on the map GameObject moverObject = PhotonNetwork.Instantiate("Rooms/RoomFeatures/" + m_playerMoverPrefab.name, Vector3.zero, Quaternion.identity, 0); BasePlayerMover mover = moverObject.GetComponent<BasePlayerMover>(); m_mover = mover; m_mover.Construct(startRoom); PhotonNetwork.Spawn(mover.photonView); InitializeCamera(startRoom.CameraNode.position, startRoom.CameraNode.rotation); photonView.RPC(nameof(InitializeCamera), PhotonTargets.Others, startRoom.CameraNode.position, startRoom.CameraNode.rotation); m_hasStarted = true; } base.OnStartOwner(wasSpawn); }