public void tryUnlock() { if (__completion_status != COMPLETION.DONE) { __completion_status = COMPLETION.UNLOCKED; } }
public void updateCompletionFromLevelProgress() { bool stage_done = LevelProgress.getCompletion(level_to_load, stage_to_load); if (stage_done) { // unlock neighbors __completion_status = COMPLETION.DONE; unlock_neighbors(); } }
// Start is called before the first frame update void Start() { base.init(); id = stage_to_load; if (id == 0) // Starting stage { __completion_status = COMPLETION.UNLOCKED; } else { __completion_status = COMPLETION.LOCKED; } __sr = GetComponent <SpriteRenderer>(); }
public void updateCompletion(Level.WORLD_POI iStagePOI) { isStartingStage = (iStagePOI == Level.WORLD_POI.START_STAGE); if (iStagePOI == Level.WORLD_POI.LOCKED_STAGE) { __completion_status = COMPLETION.LOCKED; } else if ((iStagePOI == Level.WORLD_POI.START_STAGE) || (iStagePOI == Level.WORLD_POI.UNLOCKED_STAGE)) { __completion_status = COMPLETION.UNLOCKED; } else if (iStagePOI == Level.WORLD_POI.DONE_STAGE) { __completion_status = COMPLETION.DONE; } else // default { __completion_status = COMPLETION.LOCKED; } }