Ejemplo n.º 1
0
    public void LoadLevel(int level)
    {
        StopAllCoroutines();
        DestroyMap();
        currentMap = Instantiate(Resources.Load <GameObject>("Map")).GetComponent <Map>();
        if (isLoaded)
        {
            Random.InitState(buildSeed);
            isLoaded = false;//초기화
        }
        else
        {
            buildSeed = Random.Range(int.MinValue, int.MaxValue);
            Random.InitState(buildSeed);
        }
        Debug.Log("Seed : " + buildSeed);
        if (Config.instance.RoomTestMode)
        {
            BuildMap(Config.instance.floorNum);
        }
        else
        {
            BuildMap(level);
        }
        MinimapTexture.Init(currentMap);

        player.EnterRoom(CurrentMap.StartRoom);
        MinimapTexture.DrawPlayerPos(CurrentRoom().transform.position, player.pos);
        UIManager.instance.FloorCount(level);
        PlayerControl.instance.AkashaGage = Config.instance.DefaultAkasha;

        ///업적: 층
        SaveManager.ArriveStage(level);
    }
Ejemplo n.º 2
0
 public void ReturnToStart()
 {
     if (!GameManager.instance.CurrentRoom().IsEnemyAlive())
     {
         if (GameManager.instance.IsInputOk && GameManager.instance.CurrentTurn == Turn.PLAYER)
         {
             player.EnterRoom(GameManager.instance.CurrentMap.StartRoom);
             MinimapTexture.DrawPlayerPos(GameManager.instance.CurrentRoom().transform.position, PlayerControl.player.pos);
         }
     }
 }
Ejemplo n.º 3
0
    IEnumerator EndTurnDelay(float time)
    {
        yield return(null);

        if (PlayerControl.player.PlayerAnim == null)
        {
            yield return(new WaitForSeconds(time));
        }
        else
        {
            yield return(PlayerControl.player.PlayerAnim);
        }
        MinimapTexture.DrawPlayerPos(CurrentRoom().transform.position, PlayerControl.player.pos);
        EnemyControl.instance.EnemyTurn();
    }