public void SetActiveState(LevelInfo info) { var state = info.state; var level = info.level; switch (state) { case LevelInfo.CURRENT: itemController.CurrenLevel.SetActive(true); clickHandler.AddOnClickCurrenLevelListener(level); break; case LevelInfo.OK: itemController.OkLevel.SetActive(true); flagController.SetFlagIcon(info.flag); clickHandler.AddOnClickOkLevelListener(level); break; case LevelInfo.LOCK: itemController.LockLevel.SetActive(true); clickHandler.AddOnClickLockLevelListener(level); break; } }