public void ActivateMode(string id) { var mode = ModesStorage.Modes.Find(x => x.Id == id); if (mode) { CurrentMode = mode; } }
public override void Init() { buildingsGrid.Init(); for (int i = 0; i < ModesStorage.Modes.Count; i++) { var mode = ModesStorage.Modes[i]; mode.Init(buildingsGrid); if (mode.Id == GameConstants.DEFAULT_BUILDINGS_MODE_ID) { CurrentMode = mode; } } }