public void LoadImage(int indexStage) { int curUnitStage = SaveLoadStageData.LoadDataStage(indexStage); Debug.Log("indexL " + _index); if (_index < curUnitStage) { enabled = true; level.color = defaultColor; unitImage.color = defaultColor; unitImage.sprite = unitSprite.GetSprite(PASSED); } else if (_index == curUnitStage) { enabled = true; level.color = defaultColor; unitImage.color = defaultColor; unitImage.sprite = unitSprite.GetSprite(CURRENT); } else { enabled = false; level.color = hide; unitImage.color = hide; unitImage.sprite = unitSprite.GetSprite(HIDE); } }
public void EventWin() { int curIndexUnit = SaveLoadStageData.LoadDataStage(indexStage); if (curIndexUnit <= indexUnit) { Debug.Log("run"); SaveLoadStageData.SaveDataStage(indexStage, indexUnit + 1); ButtonStageManager.instance.stage.LoadImageForAllUnitStage(); } }