void Start() { btnEasy.Init(OnClickEasy); btnNormal.Init(OnClickNormal); btnHard.Init(OnClickHard); btnBack.Init(OnClickBack); spriteEasy.SetAlpha(1.0f); spriteNormal.SetAlpha(0.0f); spriteHard.SetAlpha(0.0f); CoroutineManager.Instance.AddCoroutine(this, DynamicColorize()); }
public void Init(int nStage) { this.nStage = nStage; btnStage.Init(StartGame); btnStage.SetText(nStage.ToString()); SetStartPosition(); if (UserDataManager.Instance.currDifficulty == Difficulty.Easy) { btnStage.SetStyle(E_COMMON_BUTTON_STYLE.COMMON_STAGE_EASY); } else if (UserDataManager.Instance.currDifficulty == Difficulty.Normal) { btnStage.SetStyle(E_COMMON_BUTTON_STYLE.COMMON_STAGE_NORMAL); } else if (UserDataManager.Instance.currDifficulty == Difficulty.Hard) { btnStage.SetStyle(E_COMMON_BUTTON_STYLE.COMMON_STAGE_HARD); } }
// Start is called before the first frame update void Start() { btnBack.Init(OnClickBack); SetBackground(); }