void SaveFile() { if (Planet.instance != null) { PersistantStorage.UpdateSaveName(_fileTile); Planet.instance.SaveDatas(); } }
public async Task AssignAnnouncmentChannelAsync([Remainder] ITextChannel textChannel) { Guild guildData = Guild.GetServerData(context: Context); guildData.AnnouncmentChannelId = textChannel.Id; PersistantStorage <Guild> .Write(Guild.GuildDataList); await Context.Channel.SendMessageAsync($"Announcment channel has been assigned with id: `{textChannel.Id}` for the guild: `{guildData.GuildName}`"); }
public async Task DontListServer([Remainder] bool selection) { Guild guildData = Guild.GetServerData(context: Context); guildData.IsListed = selection; PersistantStorage <Guild> .Write(Guild.GuildDataList); if (selection) { await Context.Channel.SendMessageAsync($"`{guildData.GuildName}` has been opted out of being listed in scoreboards"); } if (!selection) { await Context.Channel.SendMessageAsync($"`{guildData.GuildName}` has been opted into being listed in scoreboards"); } }
private void Awake() { instance = this; enemies = new List <Enemy>(); //storage = new PersistantStorage(); buildIndex = SceneManager.GetActiveScene().buildIndex; if (storage == null) { storage = FindObjectOfType <PersistantStorage>(); } if (scoreController == null) { scoreController = FindObjectOfType <ScoreController>(); } if (unitSelector == null) { unitSelector = FindObjectOfType <UnitSelector>(); } }
private void Start() { storage = GameController.instance.Storage; GameController.instance.OnFinishLevel += AddCurrentScore; storage.LoadHighScore(this); }