1234567891011121314151617181920212223242526272829303132333435 |
- #include "Schalter.h"
- Schalter::Schalter( int id, int x, int y, int width, int height, bool aktive )
- : GameObject( SCHALTER, x, y, width, height )
- {
- this->id = id;
- this->aktiv = aktive;
- aktivierungen = 0;
- }
- void Schalter::setAktive( bool aktiv )
- {
- this->aktiv = aktiv;
- }
- void Schalter::press()
- {
- aktivierungen++;
- }
- int Schalter::getAnzahlAktivierungen() const
- {
- return aktivierungen;
- }
- bool Schalter::isAktive() const
- {
- return aktiv;
- }
- int Schalter::getId() const
- {
- return id;
- }
|