示例#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);
    }