12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #include "Laser.h"
- #include "Karte.h"
- // Inhalt der Laser Klasse aus Laser.h
- // Konstruktor
- Laser::Laser( int id, Vec2< double > pos, Vec2< double > speed, int sNum, double intensity )
- : Object2D()
- {
- this->id = id;
- setPosition( pos );
- setSpeed( speed );
- this->sNum = sNum;
- this->intensity = intensity;
- }
- // nicht constant
- bool Laser::tick( const WeltInfo &info, double tickVal )
- {
- Object2D::tick( info, tickVal );
- intensity -= tickVal * 2;
- return 0;
- }
- void Laser::render( Mat3< float > &kamMat, Bild &zRObj )
- {}
- // constant
- Rect2< float > Laser::getBoundingBox() const
- {
- return Rect2< float >();
- }
- int Laser::getId() const
- {
- return id;
- }
- int Laser::getSpieler() const
- {
- return sNum;
- }
- double Laser::getIntensity() const
- {
- return intensity;
- }
|