#include "Bullet.h"
#include "constants.h"

USING_NS_CC;
Bullet::Bullet(void)
{
}

Bullet::Bullet(unsigned id,
		unsigned type,
		unsigned team,
		cocos2d::Vec2 position,
		cocos2d::Node* parent,
		cocos2d::Vec2 direction,
		float speed):
Item(id,type,team,position,parent,direction,speed)
{
}


Bullet::~Bullet(void)
{
}

void Bullet::UpdateRect()
{
	_rect.center = _sprite->getPosition();
}

void Bullet::init(int prop, cocos2d::Vec2 direction, cocos2d::Vec2 size)
{
	_property = &(g_properties[prop]);
	_direction = direction;
	_rect.size = size;
}