NVector NComponent::getParentScale() const { if (mParent != nullptr) { return mParent->getScale(); } else { return NVector(); } }
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); }
void NTransformable::setScale(float x, float y) { setScale(NVector(x,y)); }
void NTransformable::setPosition(float x, float y, float z) { setPosition(NVector(x,y,z)); }
void MoveableEntity::Init() { InitComponents(); mVel = NVector(0, 0); }
void NSpriteComponent::setOrigin(float x, float y, float z) { setOrigin(NVector(x,y,z)); }