Schiene.cpp 617 B

123456789101112131415161718192021
  1. #include "Schiene.h"
  2. Schiene::Schiene( ResourceRegistry *zResources, int id, int x, int y, int width, int height )
  3. : GameObject( SCHIENE, x, y, width, height )
  4. {
  5. this->id = id;
  6. if( width > height )
  7. this->textur = zResources->zResource( R_SCHIENE, 0 )->getImages()->getThis();
  8. else
  9. {
  10. Bild *r = zResources->zResource( R_SCHIENE, 0 )->getImages();
  11. this->textur = new Bild();
  12. this->textur->neuBild( r->getHeight(), r->getBreite(), 0 );
  13. this->textur->drawBild90( 0, 0, r->getHeight(), r->getBreite(), *r );
  14. }
  15. }
  16. int Schiene::getId() const
  17. {
  18. return id;
  19. }