MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / GameObject

Class GameObject

Source/GameObject.h:89–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87};
88
89class GameObject : public ax::Sprite, public ax::ActionTweenDelegate
90{
91 private:
92 ax::Rect _pOuterBounds;
93 ax::Rect _pInnerBounds;
94
95 int m_pId;
96
97 bool m_bActive;
98
99 bool _primaryInvisible; //needed because robtop
100
101 GameObjectType _pObjectType;
102
103 int _pColorRed;
104 int _pColorGreen;
105 int _pColorBlue;
106 float _pDuration;
107 virtual void updateTweenAction(float value, std::string_view key) override;
108
109 public:
110 std::vector<ax::Sprite*> _childSprites;
111 std::vector<int16_t> _childSpritesChannel;
112 std::vector<ax::Vec2> _childSpritesScaling;
113 std::string _texturePath;
114
115 ax::Vec2 _startPosition, _firstPosition, _startPosOffset;
116
117 float _effectOpacityMultipler = 1.f;
118
119 bool _unkbool;
120
121 std::vector<int> _groups;
122
123 virtual void setPosition(const ax::Vec2& pos) override;
124 virtual void setRotation(float rotation) override;
125 virtual void setScaleX(float scalex) override;
126 virtual void setScaleY(float scaley) override;
127 virtual void setOpacity(uint8_t opacity) override;
128
129
130 void setStartPosition(ax::Vec2 pos) { _startPosition = pos; }
131
132 void setStartPositionX(float x) { _startPosition.x = x; }
133
134 void setStartPositionY(float y) { _startPosition.y = y; }
135
136 ax::Vec2 getStartPosition() { return _startPosition; }
137
138 float getStartPositionX() { return _startPosition.x; }
139
140 float getStartPositionY() { return _startPosition.y; }
141
142 ax::Vec2 _startScale = {1.f, 1.f};
143
144 void setStartScale(ax::Vec2 scale) { _startScale = scale; }
145
146 void setStartScaleX(float x) { _startScale.x = x; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected