project2D/Player.cpp
//--------------------------------------------------------------------------------------
// Default Constructor.
//
// Param: 
//		textureUrl: Takes in a char for specifying a texture url in texture file location.
//--------------------------------------------------------------------------------------
Default Constructor.
Param:
textureUrl: Takes in a char for specifying a texture url in texture file location.
Default Constructor . Param : textureUrl : Takes in a char for specifying a texture url in texture file location .
Player::Player(char* textureUrl) : Entity(textureUrl)
{
	CollisionManager* collider = CollisionManager::GetInstance();
	collider->AddObject(this);
	Turret = new turret("rock_large");
	Turret->setParent(this);
	this->setChild(Turret);
	rotSpeed = 3.14f;
	this->SetType(PLAYER);
}
Player :: Player ( char * textureUrl ) : Entity ( textureUrl ) { CollisionManager * collider = CollisionManager :: GetInstance ( ) ; collider -> AddObject ( this ) ; Turret = new turret ( " " ) ; Turret -> setParent ( this ) ; this -> setChild ( Turret ) ; rotSpeed = 3.14f ; this -> SetType ( PLAYER ) ; }
Default Constructor.
Default Constructor .
// Create a collidable object for walls. // Create a Turret. // Set the players child to Turret. // initialize rotSpeed. // Set the type of object to wall