示例#1
0
//		public List<Dict_army> achievenments ;

        public List <HeroData> LoadHeroDatas()
        {
            heroDatas = new List <HeroData>();
            file.Open(CSVFileConfigs.dict_hero);
            List <Row> data = file.mapData;

            foreach (Row row in data)
            {
                HeroData heroData = new HeroData();
                row.GetIntValue(DICT_HERO.HERO_TYPEID, out heroData.id);
                heroDatas.Add(heroData);
            }
            return(heroDatas);
        }
        public static UserData GetUserData()
        {
            if (user == null)
            {
                user = new UserData();
            }
            user.name       = "根本停不下来";
            user.coin       = 1000;
            user.crystal    = 100;
            user.dollor     = 10;
            user.exp        = 20;
            user.upgradeExp = 50;
            user.level      = 1;
            user.heros      = new List <HeroData>();

            HeroData hero = new HeroData();

            hero.attack  = 10;
            hero.defence = 4;
            hero.health  = 100;
            hero.star    = 1;
            hero.id      = 10001;
            hero.card    = "CleopatraVII_s";
            hero.fight   = hero.attack * hero.defence * hero.health;
            user.heros.Add(hero);

            hero         = new HeroData();
            hero.attack  = 10;
            hero.defence = 4;
            hero.health  = 100;
            hero.star    = 1;
            hero.id      = 10002;
            hero.card    = "KingArthur_s";
            hero.fight   = hero.attack * hero.defence * hero.health;
            user.heros.Add(hero);

            hero         = new HeroData();
            hero.attack  = 10;
            hero.defence = 4;
            hero.health  = 100;
            hero.star    = 1;
            hero.id      = 10003;
            hero.card    = "Richard_s";
            hero.fight   = hero.attack * hero.defence * hero.health;
            user.heros.Add(hero);

            hero         = new HeroData();
            hero.attack  = 10;
            hero.defence = 4;
            hero.health  = 100;
            hero.star    = 1;
            hero.id      = 10004;
            hero.card    = "RobinHood_s";
            hero.fight   = hero.attack * hero.defence * hero.health;
            user.heros.Add(hero);

            hero         = new HeroData();
            hero.attack  = 10;
            hero.defence = 4;
            hero.health  = 100;
            hero.star    = 1;
            hero.id      = 10005;
            hero.card    = "Sparta_s";
            hero.fight   = hero.attack * hero.defence * hero.health;
            user.heros.Add(hero);

            return(user);
        }