MCPcopy Create free account
hub / github.com/atraczyk/2d-engine / Player

Class Player

engine/src/entity.h:180–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178};
179
180class Player : public Entity
181{
182public:
183 bool canWarp;
184 int score;
185 int hit;
186 int hitEnemy;
187 bool tryingToHold;
188 int holding;
189 int kicking;
190 bool lookingUp;
191 bool crouching;
192 bool swimming;
193 int cantSwim;
194 int health;
195
196 Player();
197 ~Player();
198
199 void Hit();
200 void draw(Camera* camera);
201 void reinitialize(float x, float y);
202 void update(WorldRect* pconstraints, TileMap* pcollisionmap,
203 TileMap* pfrontmap, std::vector<TileMap>* pdcollisionmaps,
204 Vector2 world_accel, int elapsedFrames, Camera* pcamera,
205 ScreenRect* pscreen);
206 void resolveTileCollisions(bool dynamic);
207 void resolveFrame(int elapsedframes);
208 void resolveItemCollisions(TileMap* pmap);
209};
210
211class Enemy : public Entity
212{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected