コード例 #1
0
        public Dictionary <string, Account> AccountsList()
        {
            Dictionary <string, Account> tempList = new Dictionary <string, Account>();

            using (StreamReader fileRead = new StreamReader("Assets/files/accounts.txt"))
            {
                while (!fileRead.EndOfStream)
                {
                    string            newinput     = fileRead.ReadLine();
                    string[]          pts          = newinput.Split('/');
                    string            name         = pts[0];
                    int               storymodeint = int.Parse(pts[1]);
                    storymodeProgress storymode    = (storymodeProgress)storymodeint;
                    int               gamemodeint  = int.Parse(pts[2]);
                    currentmode       gamemode     = (currentmode)gamemodeint;
                    Account           tempAccount  = new Account(name, storymode, gamemode);
                    tempList.Add(name, tempAccount);
                }
            }
            return(tempList);
        }
コード例 #2
0
 public Account(string name, storymodeProgress inputProgress, currentmode modestatus)
 {
     this.Name            = name;
     this.AccountProgress = inputProgress;
     this.AccountMode     = modestatus;
 }
コード例 #3
0
 public Account(string name)
 {
     this.Name            = name;
     this.AccountProgress = storymodeProgress.StoryModeUnstarted;
     this.AccountMode     = currentmode.loggedin;
 }