private void RemovePlayerFromFerry(IslandController island) { state = PlayerFerryState.None; var onFerry = OnFerry; if (onFerry) { player.transform.SetParent(null); player.transform.position = island.DockingArea.DockPosition; } player.Island = island ?? gameManager.Islands.FindPlayerIsland(player); player.Unlock(); if (player.Chunk != null) { player.GotoClosest(player.Chunk.ChunkType); } if (onFerry) { gameManager.Server?.Client?.SendCommand( player.PlayerName, "ferry_success", $"You have disembarked the ferry."); } }
private void AddPlayerToFerry() { var ferryPoint = ferry.GetNextPlayerPoint(); if (ferryPoint) { state = PlayerFerryState.Embarked; player.transform.SetParent(ferryPoint); player.transform.localPosition = Vector3.zero; player.transform.rotation = ferryPoint.rotation; player.Island = null; } }
public void Disembark(IslandController destination = null) { state = PlayerFerryState.Disembarking; this.destination = destination; }
public void Embark(IslandController destination = null) { player.Animations.ResetAnimationStates(); state = PlayerFerryState.Embarking; this.destination = destination; }