Exemplo n.º 1
0
UnitViewController::UnitViewController(UnitModel* model, GLfloat width, GLfloat height, int index) : BaseUnitViewController(width, height, index, MapLayer::UNIT) {
	_unitModel = model;
	_unitImage = new GameImage(width, height, TextureCatalog::instance()->get("units"), index);
    _hpBar = new RectangleImage(RGBAMake(0.0f, 1.0f, 0.0f, 1.0f), 32.0f, 4.0f, true);
    _apBar = new RectangleImage(RGBAMake(0.0f, 0.0f, 1.0f, 1.0f), 32.0f, 6.0f, true);
    _hpBarSlot = new RectangleImage(RGBAMake(0.5f, 0.5f, 0.5f, 1.0f), 32.0f, 4.0f, true);
    _apBarSlot = new RectangleImage(RGBAMake(0.5f, 0.5f, 0.5f, 1.0f), 32.0f, 6.0f, true);
}
Exemplo n.º 2
0
MessageView::MessageView(const GPoint& pos, const std::string& string, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
	_pos = pos;
    _posOffset = GPointMake(0.0f, -10.0f);
    _counter = 0;
    _width = 0.0f;
    _height = 0.0f;
    
	_stringImage = new StringImage(string, RGBAMake(red, green, blue, alpha));
}
Exemplo n.º 3
0
MessageView::MessageView(const GPoint& pos, const std::string& string) : ViewController(pos, 0.0f, 0.0f, MapLayer::GUI) {
    _posOffset = GPointMake(0.0f, -10.0f);
    _counter = 0;

	_stringImage = new StringImage(string, RGBAMake(1.0f, 1.0f, 1.0f, 1.0f));
}