Esempio n. 1
0
 void SaveFile()
 {
     if (Planet.instance != null)
     {
         PersistantStorage.UpdateSaveName(_fileTile);
         Planet.instance.SaveDatas();
     }
 }
Esempio n. 2
0
        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}`");
        }
Esempio n. 3
0
        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");
            }
        }
Esempio n. 4
0
 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>();
     }
 }
Esempio n. 5
0
 private void Start()
 {
     storage = GameController.instance.Storage;
     GameController.instance.OnFinishLevel += AddCurrentScore;
     storage.LoadHighScore(this);
 }