IEnumerator LoadMap(MapType _mapType, MapMovePointType _pointType) { Message.Send <FadeInMsg>(new FadeInMsg()); yield return(StartCoroutine(mapManager.Load_Resource(_mapType.ToString()))); while (!mapManager.IsLoadComplete) { yield return(null); } if (mapManager.GetBattlePossible()) { UI.IDialog.RequestDialogEnter <UI.CharacterDialog>(); Message.Send <UIPlayerHpMsg>(new UIPlayerHpMsg(playerManager.GetPlayerName(), playerManager.GetPlayerMaxHp(), playerManager.GetPlayerHp() )); } else { UI.IDialog.RequestDialogExit <UI.CharacterDialog>(); } for (int i = 0; i < monsterManager.transform.childCount; i++) { Destroy(monsterManager.transform.GetChild(i).gameObject); } if (mapManager.GetMonsters() != null) { mapManager.GetMonsters().transform.parent = monsterManager.gameObject.transform; } monsterManager.Init_Monster(mapManager.GetMonsters(), mapManager.GetGrid()); Vector2 startPos; if (_pointType == MapMovePointType.End) { startPos = mapManager.GetStartPos(); } else { startPos = mapManager.GetEndPos(); } playerManager.SetPlayerInMap(mapManager.GetBattlePossible(), startPos); Message.Send <FadeOutMsg>(new FadeOutMsg()); }
public EventMapMove(object sender, MapMovePointType type) { this.sender = sender; this.type = type; }