public void LeaveHome() { if (toPlatform == null) { mapEvents.Teleport(worldMaps, toMap); } else { mapEvents.Teleport(worldMaps, toMap, toPlatform); } GameManager.CurrentArea = GlobalArea.Map; canvasMain.Resume(); }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.CompareTag(PlayerMain.GetPlayer.tag)) { Debug.Log(toWorld + " " + toMap.name); if (toPlatform == null) { mapEvents.Teleport(toWorld, toMap); } else { mapEvents.Teleport(toWorld, toMap, toPlatform); } } }
public void EnterHome() { GameManager.CurState = GameState.Free; GameManager.CurrentArea = GlobalArea.Home; ToggleBigPanel(new List <Transform>() { Home.transform, Gameui.transform }); Home.transform.SleepChildren(Home.transform.GetChild(0)); if (homeLandPlatform == null) { mapEvents.Teleport(WorldMaps.Home, homeMapHandler.GetActiveLawn); } else { mapEvents.Teleport(WorldMaps.Home, homeMapHandler.GetActiveLawn, homeLandPlatform); } }
public void TelePortTo() { CanTelePortTo.TeleportTo(); mapEvents.Teleport(World, Map, landPlatform); }