Ejemplo n.º 1
0
NVector NComponent::getParentScale() const
{
    if (mParent != nullptr)
    {
        return mParent->getScale();
    }
    else
    {
        return NVector();
    }
}
Ejemplo n.º 2
0
void SensorComponent::Init()
{
	// Création du body de la taille de la porte
	int numVerts = 4;
	NVector* points = PolyColl::BuildBox(numVerts, width, height);
	sensor->Initialise(parent->mPos + NVector(width/2, height/2), 0.0f, points, numVerts);
	sensor->isSensor = true;
	sensor->bodytype = BODY_FULL;

	parent->GetEntityManager()->GetGameMap()->AddBody(sensor);
	
	parent->SetSensorBody(sensor);
}
Ejemplo n.º 3
0
void NTransformable::setScale(float x, float y)
{
    setScale(NVector(x,y));
}
Ejemplo n.º 4
0
void NTransformable::setPosition(float x, float y, float z)
{
    setPosition(NVector(x,y,z));
}
Ejemplo n.º 5
0
void MoveableEntity::Init()
{
	InitComponents();

	mVel = NVector(0, 0);
}
Ejemplo n.º 6
0
void NSpriteComponent::setOrigin(float x, float y, float z)
{
    setOrigin(NVector(x,y,z));
}