1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- #pragma once
- #include <Text.h>
- using namespace Framework;
- enum VariableTyp
- {
- NICHTS,
- INTEGER,
- BOOLEAN,
- STRING,
- RICHTUNG,
- FLOAT,
- TASTE,
- SPIELER,
- TIMER,
- TEAM,
- BARIERE,
- SCHALTER,
- BASE,
- DROP,
- GEGENSTAND,
- GEGENSTAND_TYP,
- GESCHOSS,
- GESCHOSS_TYP,
- SCHIENE,
- TUNNEL,
- UMLENKUNG,
- TRIGGER,
- FEUERBALL_TREFFER,
- AKTION,
- GAME_OBJEKT,
- ALLE
- };
- bool operator==( VariableTyp a, VariableTyp b );
- bool operator!=( VariableTyp a, VariableTyp b );
- class Variable
- {
- private:
- VariableTyp typ;
- int ref;
- public:
- Variable( VariableTyp typ );
- virtual ~Variable();
- VariableTyp getVariableTyp() const;
- Variable *getThis();
- Variable *release();
- };
- bool isTrue( Variable *v );
- class Integer : public Variable
- {
- private:
- int value;
- public:
- Integer( int value, bool taste = 0 );
- void setValue( int value );
- int getValue() const;
- };
- class Boolean : public Variable
- {
- private:
- bool value;
- public:
- Boolean( bool value );
- void setValue( bool value );
- bool getValue() const;
- };
- class String : public Variable
- {
- private:
- Text value;
- public:
- String( const char *value, bool richtung = 0, bool geschossTyp = 0 );
- void setValue( Text value );
- const Text &getValue() const;
- };
- class Float : public Variable
- {
- private:
- float value;
- public:
- Float( float value );
- void setValue( float value );
- float getValue() const;
- };
|