Very basic implementation of OnTouch

This commit is contained in:
Modnark
2022-10-11 10:03:04 -04:00
parent adade066cc
commit d2f3e718a7
6 changed files with 149 additions and 14 deletions

View File

@@ -30,18 +30,13 @@ public:
//OnTocuh
Enum::ActionType::Value OnTouchAction;
Enum::Sound::Value OnTouchSound;
Enum::Sound::Value OnTouchSound;
//Variables
Color3 color;
bool canCollide;
dBodyID physBody;
dGeomID physGeom[3];
bool singleShot;
int touchesToTrigger;
int uniqueObjectsToTrigger;
int changeScore;
int changeTimer;
//Getters
Vector3 getPosition();
@@ -53,6 +48,13 @@ public:
Box getScaledBox();
CoordinateFrame getCFrame();
//OnTouch Getters
bool isSingleShot();
int getTouchesToTrigger();
int getUniqueObjectsToTrigger();
int getChangeScore();
float getChangeTimer();
//Setters
void setParent(Instance* parent);
void setPosition(Vector3);
@@ -74,6 +76,9 @@ public:
bool collides(PartInstance * part);
bool collides(Box);
// onTouch
void onTouch();
//Properties
virtual std::vector<PROPGRIDITEM> getProperties();
virtual void PropUpdate(LPPROPGRIDITEM &pItem);
@@ -87,4 +92,12 @@ private:
bool dragging;
Box itemBox;
GLuint glList;
// OnTouch
bool singleShot;
int touchesToTrigger;
int uniqueObjectsToTrigger;
int changeScore;
float changeTimer;
bool _touchedOnce;
};