1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #include "Laser.h"
- #include "Karte.h"
- // Inhalt der Laser Klasse aus Laser.h
- // Konstruktor
- Laser::Laser( int id, Vertex pos, Vertex speed, int sNum, double intensity )
- : Object2D()
- {
- this->id = id;
- setPosition( pos );
- setSpeed( speed );
- this->sNum = sNum;
- this->intensity = intensity;
- setCollision( 0 );
- }
- // 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, const char *kamName )
- {}
- // 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;
- }
|