示例#1
0
    public void LoadLevel()
    {
        SetInputActive(false);
        GameMode.ResetLocalLevelAtributes();

        if (CurrentLevelNumber < CurrentMode.childCount)
        {
            CurrentLevel = CurrentMode.GetChild(CurrentLevelNumber).gameObject;

            CurrentLevelCopy = Instantiate(CurrentLevel);

            CurrentLevel.SetActive(true);

            GameMode.NewLevelStarted(CurrentLevel);
            SetCurrentTile(CurrentLevel.GetComponent <LevelManager>().GetLevelStart());

            CurrentPlayerPosition.transform.position = CurrentLevel.GetComponent <LevelManager>().GetLevelStart().transform.position;

            GameController.GameControl.NewLevelUnlocked(GetModeIndex(), GetLevelIndex());
            GameController.GameControl.NewCurrentLevel(GetModeIndex(), GetLevelIndex());

            ShowLevelDetails(CurrentModeNumber, CurrentLevelNumber);
            ScalePositionMarker(CurrentLevel);
            RemoveAxles();
            NextMovePrep();
        }
    }