#pragma once
#include "cocos2d.h"
#include "Unit.h"
#include "SoundMaster.h"
#include "PRect.h"

#define DT 1.0 / 60
#define DELIM '|'

#define ZO_GAMESCENE		1
#define ZO_HUD				3

#define GOOD_END_SCORE		50000
//USING_NS_CC;

extern cocos2d::Rect g_gameSize;
extern const std::string fontname;
extern const float fontsize;

extern std::vector<UnitTemplate> g_templates;
extern std::vector<AttackProp> g_properties;
extern std::string g_playerName;

extern const float nameFontSize;
extern bool g_pause;
extern SoundMaster soundMaster;
extern const int secondsInMin;

extern cocos2d::Vec2 dir_left;
extern cocos2d::Vec2 dir_right;
extern cocos2d::Vec2 dir_up;
extern cocos2d::Vec2 dir_down;

#define DIRECTION_COUNT 8
extern cocos2d::Vec2 directions[DIRECTION_COUNT];

int sign(float a);