示例#1
0
    public void LoadStat(GameLevelSO gl)
    {
        currentImage = GetComponent <Image>();
        levelStat    = gl;
        medalM.SetActive(gl.medalM);
        medalS.SetActive(gl.medalS);
        lockIcon.SetActive(gl.isLevelLock);
        timeTxt.gameObject.SetActive(false);
        currentImage.color = gl.isLevelComplete ? levelCompleteColor : Color.grey;

        levelNameTxt.text = gl.levelName;
    }
示例#2
0
    void Start()
    {
        isSecretFind = false;
        Instantiate(gameParam.currentLevel.levelPrefab);
        Transform spawn = GameObject.FindGameObjectWithTag("Respawn").transform;

        if (spawn != null)
        {
            ps.SetStartSpawnPoint(spawn);
        }
        //на всю главу 1 саундтре. Он заканчивается, начинается следущий
        //AudioManager._instance.PlaySoundEffect(gameParam.currentChapter.chapterMainSound);
        if (!gameParam.currentLevel.boss)
        {
            nextlevel = gameParam.currentChapter.levels[gameParam.currentLevel.levelN];
        }
        else
        {
            nextlevel = gameParam.currentLevel;
        }
    }
示例#3
0
 void OnEnable()
 {
     level = (GameLevelSO)target;
 }