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; }
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; } }
void OnEnable() { level = (GameLevelSO)target; }