예제 #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 static string FindScene(storymodeProgress value)
        {
            Dictionary <storymodeProgress, string> newdic = new Dictionary <storymodeProgress, string>();

            using (StreamReader reader = new StreamReader("Assets/Files/SceneDic.txt"))
            {
                while (!reader.EndOfStream)
                {
                    string            inputstring             = reader.ReadLine();
                    string[]          pts                     = inputstring.Split('/');
                    string            scenelist               = pts[0];
                    int               valueint                = int.Parse(pts[1]);
                    storymodeProgress progesStorymodeProgress = (storymodeProgress)valueint;
                    newdic.Add(progesStorymodeProgress, scenelist);
                }
            }
            string scenename;

            newdic.TryGetValue(value, out scenename);
            return(scenename);
        }
예제 #3
0
 public Account(string name, storymodeProgress inputProgress, currentmode modestatus)
 {
     this.Name            = name;
     this.AccountProgress = inputProgress;
     this.AccountMode     = modestatus;
 }