public Color GetColor(WorldColorSet set, WorldID world) { if (world == WorldID.Default) { return(set.defaultColor); } else { return(set.colors[(int)world]); } }
void Update() { if (!Application.isPlaying && gameObject.scene != null && backgroundColorSet != null) { if (testWorld != lastTestWorld || backgroundColorSet != lastColorSet) { lastTestWorld = testWorld; lastColorSet = backgroundColorSet; var color = WorldManager.I.GetColor(backgroundColorSet, testWorld); UpdateCamera(color); } } }
/// <summary> /// Get color for current world /// </summary> public Color GetColor(WorldColorSet set) { return(GetColor(set, CurrentWorld)); }