22 #include "lvl_camera.h"
26 #include "lvl_base_object.h"
27 #include <controls/controllable_object.h>
28 #include <data_configs/obj_player.h>
29 #include <common_features/matrix_animator.h>
31 #include <common_features/event_queue.h>
47 void setCharacterSafe(
int CharacterID,
int _stateID);
49 bool _doSafeSwitchCharacter;
56 void refreshEnvironmentState();
58 void updateCollisions();
64 typedef QHash<int, PGE_Phys_Object*> PlayerColliders;
65 QHash<int, PGE_Phys_Object*> collided_top;
66 QHash<int, PGE_Phys_Object*> collided_left;
67 QHash<int, PGE_Phys_Object*> collided_right;
68 QHash<int, PGE_Phys_Object*> collided_bottom;
69 QHash<int, PGE_Phys_Object*> collided_center;
70 LVL_Npc * collided_talkable_npc;
79 void teleport(
float x,
float y);
80 void exitFromLevel(QString levelFile,
int targetWarp,
long wX=-1,
long wY=-1);
82 QHash<int, obj_player_state > states;
97 void kill_npc(
LVL_Npc*target, kill_npc_reasons reason);
101 QHash<int, obj_player_physics > physics;
102 QHash<int, int > environments_map;
106 int last_environment;
125 void kill(deathReason reason=DEAD_killed);
129 deathReason kill_reason;
133 float invincible_delay;
135 bool blink_screen_state;
138 void harm(
int _damage=1);
139 void setInvincible(
bool state,
float delay,
bool enableScreenBlink=
false);
148 bool on_slippery_surface;
159 float bumpJumpVelocity;
161 void bump(
bool _up=
false,
double bounceSpeed=0.0,
int timeToJump=0);
162 inline void bumpf(
bool _up,
float bounceSpeed=0.0f,
int timeToJump=0)
164 bump(_up, (
double)bounceSpeed, timeToJump);
169 QHash<intptr_t, PGE_Phys_Object* > climbable_map;
171 double climbableHeight;
175 bool contactedWithWarp;
178 int wasEnteredTimeout;
182 float warpPipeOffset;
187 void processWarpChecking();
188 void WarpTo(
float x,
float y,
int warpType,
int warpDirection=1);
194 bool floating_isworks;
195 float floating_timer;
196 float floating_maxtime;
210 void attack(AttackDirection _dir);
230 void setDuck(
bool duck);
232 void _collideUnduck();
236 void render(
double camX,
double camY);
241 void setLocked(
bool lock);
243 int _exiting_swimTimer;
254 virtual void lua_onLoop(){}
264 void refreshAnimation();
267 #endif // LVL_PLAYER_H
bool forceCollideCenter
collide with invizible blocks at center
Definition: lvl_player.h:60
Definition: lvl_camera.h:36
void update(float ticks)
Definition: lvl_player_update.cpp:27
Provides controller input interface for a physical objects (for example, playable characters) ...
Definition: controllable_object.h:30
QHash< intptr_t, PGE_Phys_Object * > foot_contacts_map
staying on ground surfaces
Definition: lvl_player.h:149
Level specific Warp entry structure. Defines preferences of each Warp entry.
Definition: lvl_filedata.h:231
Definition: obj_player.h:103
Definition: obj_player.h:31
QHash< intptr_t, PGE_Phys_Object * > foot_sl_contacts_map
Slipery surfaces.
Definition: lvl_player.h:150
float bumpVelocity
down velocity
Definition: lvl_player.h:158
bool floating_start_type
true= sin(time), false= cos(time)
Definition: lvl_player.h:197
Definition: lvl_section.h:34
Definition: lvl_player.h:39
LVL_Player()
Definition: lvl_player.cpp:22
Definition: lvl_block.h:31
PGE_LevelCamera * camera
Connected camera.
Definition: lvl_player.h:77
void setCharacter(int CharacterID, int _stateID)
Definition: lvl_player_setup.cpp:48
float gscale_Backup
BackUP of last gravity scale.
Definition: lvl_player.h:142
void WarpTo(float x, float y, int warpType, int warpDirection=1)
Definition: lvl_player_warps_and_teleports.cpp:139
int bumpJumpTime
Up jump velocity.
Definition: lvl_player.h:160
Definition: obj_player.h:75
Definition: matrix_animator.h:40
The PGE_Phys_Object class.
Definition: lvl_base_object.h:51
Level specific Player spawn point entry definition structure.
Definition: lvl_filedata.h:76
Definition: lvl_warp.h:25