Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Entity
- {
- struct mobs_normal
- {
- int id;
- string name;
- int lvl;
- int dmg_min;
- int dmg_max;
- int hp;
- int crit_chance;
- };
- void load()
- {
- // tablica obiektow struktury
- mobs_normal mob_normal[11];
- // baza z danymi mobow
- fstream file_mobs_normal;
- file_mobs_normal.open("entity/file_mobs_normal.txt", ios::in );
- if (!file_mobs_normal.good() ) {error("file_mobs_normal.txt"); }
- for (int i=0; i < 11; i++ )
- {
- file_mobs_normal >> mob_normal[i].name;
- file_mobs_normal >> mob_normal[i].lvl;
- file_mobs_normal >> mob_normal[i].dmg_min;
- file_mobs_normal >> mob_normal[i].dmg_max;
- file_mobs_normal >> mob_normal[i].hp;
- file_mobs_normal >> mob_normal[i].crit_chance;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment