add loader
add schema new loader model using xml separated work and load data validation using schema map data in xml new core model... proecting
This commit is contained in:
19
base_types.h
19
base_types.h
@@ -2,11 +2,13 @@
|
||||
#define BASE_TYPES_H
|
||||
|
||||
#include <QPointF>
|
||||
#include <QList>
|
||||
#include <QVector>
|
||||
|
||||
struct Alien
|
||||
{
|
||||
int Id;
|
||||
int Id; // uses for QHash
|
||||
QString name;
|
||||
int type;
|
||||
QPointF pos;
|
||||
float angle; // -180 .. 180
|
||||
@@ -15,19 +17,19 @@ struct Alien
|
||||
QPoint finish;
|
||||
QVector <QPointF> path;
|
||||
int pathIndex;
|
||||
unsigned int gold;
|
||||
unsigned int prise;
|
||||
};
|
||||
|
||||
|
||||
struct Tower
|
||||
{
|
||||
int Id;
|
||||
QString name;
|
||||
int type;
|
||||
int AlienId; // aim alien
|
||||
int PlayerId; // tower's owner
|
||||
QPoint pos; // not QPointF because tower fixed on grid
|
||||
float angle; // -180 .. 180
|
||||
float range;
|
||||
float range; // in cells
|
||||
float reload; // time for reload in ticks
|
||||
};
|
||||
|
||||
@@ -35,11 +37,12 @@ struct Tower
|
||||
struct Splash
|
||||
{
|
||||
int Id;
|
||||
QString name;
|
||||
int type;
|
||||
int TowerId; // parent tower
|
||||
QPoint TowerId; // parent tower (-1;-1) for null parent
|
||||
int AlienId; // aim alien (different from tower.AlienId)
|
||||
int lifetime; // in ticks
|
||||
float radius;
|
||||
float radius; // in cells
|
||||
float angle; // -180 .. 180
|
||||
QPointF pos;
|
||||
};
|
||||
@@ -48,8 +51,8 @@ struct Splash
|
||||
struct Wave
|
||||
{
|
||||
int Id;
|
||||
QVector <int> types; // some types of aliens (e.g. 2 fly and 3 grount in one wave)
|
||||
QVector <int> counts; // count aliens of each type
|
||||
QList <int> types; // some types of aliens (e.g. 2 fly and 3 grount in one wave)
|
||||
QList <int> counts; // count aliens of each type
|
||||
int wait_time; // time in ticks
|
||||
unsigned int gold;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user