Classes | |
| class | HarmEvent |
| class | KillEvent |
Public Types | |
| enum | DamageReason { DAMAGE_NOREASON =0, DAMAGE_STOMPED, DAMAGE_BY_KICK, DAMAGE_BY_PLAYER_ATTACK, DAMAGE_TAKEN, DAMAGE_LAVABURN, DAMAGE_PITFALL, DAMAGE_CUSTOM_REASON } |
| enum | WarpingSide { WARP_TOP =1, WARP_LEFT =2, WARP_BOTTOM =3, WARP_RIGHT =4 } |
|
typedef QHash< int, PGE_Phys_Object * > | PlayerColliders |
Public Types inherited from PGE_Phys_Object | |
| enum | Slopes { SLOPE_LEFT =-1, SLOPE_RIGHT =1 } |
| enum | CollisionType { COLLISION_NONE = 0, COLLISION_ANY = 1, COLLISION_TOP = 2, COLLISION_BOTTOM = 3 } |
| enum | types { LVLUnknown =0, LVLBlock, LVLBGO, LVLNPC, LVLPlayer, LVLEffect, LVLWarp, LVLSpecial, LVLPhysEnv } |
Public Member Functions | |
| void | init () |
| LevelNPC | getData () |
| void | setDirection (int dir) |
| int | direction () |
| bool | isKilled () |
| void | doHarm (int damageReason) |
| void | harm (int damage=1, int damageReason=DAMAGE_NOREASON) |
| void | talkWith () |
| void | kill (int damageReason) |
| void | unregister () |
| In-Game destroying of NPC with triggering of specific events. | |
| void | transformTo (long id, int type=0) |
| void | transformTo_x (long id) |
| void | update (float tickTime) |
| void | render (double camX, double camY) |
| void | setDefaults () |
| void | Activate () |
| void | deActivate () |
| void | updateCollisions () |
| void | solveCollision (PGE_Phys_Object *collided) |
| bool | onCliff () |
| bool | onGround () |
| PlayerPosDetector * | lua_installPlayerPosDetector () |
| Player position detectors (should have alone copy!) | |
| InAreaDetector * | lua_installInAreaDetector (float left, float top, float right, float bottom, luabind::adl::object filters) |
| Is player touches selected relative area;. | |
| ContactDetector * | lua_installContactDetector () |
| void | setSpriteWarp (float depth, WarpingSide _direction=WARP_BOTTOM, bool resizedBody=false) |
| setSpriteWarp Changes warping state of a sprite More... | |
| void | resetSpriteWarp () |
| void | setWarpSpawn (WarpingSide side=WARP_TOP) |
| void | updateGenerator (float tickTime) |
| void | resetThrowned () |
| void | setThrownedByNpc (long npcID, LVL_Npc *npcObj) |
| void | setThrownedByPlayer (long playerID, LVL_Player *npcObj) |
| long | thrownedByNpc () |
| LVL_Npc * | thrownedByNpcObj () |
| long | thrownedByPlayer () |
| LVL_Player * | thrownedByPlayerObj () |
| void | buildBuddieGroup () |
| void | updateBuddies (float tickTime) |
| void | buildLeaf (QList< LVL_Npc * > &needtochec, QList< LVL_Npc * > *&list, LVL_Npc *leader) |
| virtual void | lua_onActivated () |
| virtual void | lua_onLoop (float) |
| virtual void | lua_onInit () |
| virtual void | lua_onKill (int) |
| virtual void | lua_onHarm (int, int) |
| virtual void | lua_onTransform (long) |
| void | lua_setSequenceLeft (luabind::object frames) |
| void | lua_setSequenceRight (luabind::object frames) |
| void | lua_setSequence (luabind::object frames) |
| void | lua_setOnceAnimation (bool en) |
| bool | lua_animationIsFinished () |
| int | lua_frameDelay () |
| void | lua_setFrameDelay (int ms) |
| int | lua_activate_neighbours () |
| LVL_Npc * | lua_spawnNPC (int npcID, int sp_type, int sp_dir, bool reSpawnable=false) |
| bool | not_movable () |
| void | setNot_movable (bool n) |
| long | special1 () |
| void | setSpecial1 (long s) |
| long | special2 () |
| void | setSpecial2 (long s) |
| bool | isBoss () |
| int | getID () |
| long | getHealth () |
| void | setHealth (int _health) |
| bool | getCollideWithBlocks () |
| void | setCollideWithBlocks (bool blkcol) |
| void | show () |
| void | hide () |
| bool | isInited () |
Public Member Functions inherited from PGE_Phys_Object | |
| virtual double | posX () |
| Position X. | |
| virtual double | posY () |
| Position Y. | |
| double | posCenterX () |
| Centered Position X. | |
| double | posCenterY () |
| Centered Position Y. | |
| double | width () |
| double | height () |
| double | top () |
| void | setTop (double tp) |
| double | bottom () |
| void | setBottom (double btm) |
| double | left () |
| void | setLeft (double lf) |
| double | right () |
| void | setRight (double rt) |
| void | setSize (float w, float h) |
| void | setWidth (float w) |
| void | setHeight (float h) |
| virtual void | setPos (double x, double y) |
| void | setPosX (double x) |
| void | setPosY (double y) |
| void | setCenterPos (double x, double y) |
| void | setCenterX (double x) |
| void | setCenterY (double y) |
| double | speedX () |
| double | speedY () |
| double | speedXsum () |
| double | speedYsum () |
| void | setSpeed (double x, double y) |
| void | setSpeedX (double x) |
| void | setSpeedY (double y) |
| void | setDecelX (double x) |
| void | applyAccel (double x, double y) |
| double | gravityScale () |
| void | setGravityScale (double scl) |
| float | gravityAccel () |
| void | setGravityAccel (float acl) |
| void | _syncPosition () |
| void | _syncPositionAndSize () |
| void | _syncSection () |
| void | renderDebug (float _camX, float _camY) |
| void | iterateStep (float ticks) |
| PGE_Phys_Object * | nearestBlock (QVector< PGE_Phys_Object * > &blocks) |
| PGE_Phys_Object * | nearestBlockY (QVector< PGE_Phys_Object * > &blocks) |
| bool | isWall (QVector< PGE_Phys_Object * > &blocks) |
| bool | isFloor (QVector< PGE_Phys_Object * > &blocks, bool *isCliff=0) |
| void | setParentSection (LVL_Section *sct) |
| LVL_Section * | sct () |
| virtual GLdouble | zIndex () |
| virtual bool | isVisible () |
| virtual void | update () |
| bool | isPaused () |
| void | setPaused (bool p) |
Public Attributes | |
| LevelNPC | data |
| PGE_PointF | offset |
| PGE_Size | frameSize |
| AdvNpcAnimator | animator |
| int | _direction |
| float | motionSpeed |
| bool | is_scenery |
| bool | is_activity |
| bool | is_shared_animation |
| bool | keep_position_on_despawn |
| bool | animated |
| long | animator_ID |
| obj_npc * | setup |
| bool | killed |
| int | taskToTransform |
| Sielent destroying of NPC without triggering of the events. | |
| int | taskToTransform_t |
| bool | forceCollideCenter |
| collide with invizible blocks at center | |
| float | _heightDelta |
| bool | cliffDetected |
| bool | _onGround |
| QHash< int, int > | foot_contacts_map |
| staying on ground surfaces | |
| QHash< int, int > | foot_sl_contacts_map |
| Slipery surfaces. | |
| QHash< int, PGE_Phys_Object * > | contacted_blocks |
| QHash< int, PGE_Phys_Object * > | contacted_bgos |
| QHash< int, PGE_Phys_Object * > | contacted_npc |
| QHash< int, PGE_Phys_Object * > | contacted_players |
| QHash< int, PGE_Phys_Object * > | collided_top |
| QHash< int, PGE_Phys_Object * > | collided_left |
| QHash< int, PGE_Phys_Object * > | collided_right |
| QHash< int, PGE_Phys_Object * > | collided_bottom |
| QHash< int, PGE_Phys_Object * > | collided_center |
| bool | disableBlockCollision |
| bool | disableNpcCollision |
| bool | _stucked |
| bool | bumpDown |
| bool | bumpUp |
| QHash< int, int > | environments_map |
| int | environment |
| int | last_environment |
| bool | reSpawnable |
| bool | isActivated |
| bool | deActivatable |
| bool | wasDeactivated |
| bool | offSectionDeactivate |
| int | activationTimeout |
| QList< BasicDetector > | detectors_dummy |
| dummy detectors made directly from a base class, for a some tests | |
| PlayerPosDetector | detector_player_pos |
| QList< InAreaDetector > | detectors_inarea |
| Detects position and direction of nearest player. | |
| QList< ContactDetector > | detectors_contact |
| Detects is player(s) are enters into specific area relative to NPC's center. More... | |
| QVector< BasicDetector * > | detectors |
| Detects contacted elements. More... | |
| bool | isWarping |
| int | warpDirectO |
| bool | warpResizedBody |
| float | warpSpriteOffset |
| float | warpFrameW |
| float | warpFrameH |
| bool | warpSpawing |
| EventQueue< LVL_Npc > | event_queue |
| bool | isGenerator |
| float | generatorTimeLeft |
| int | generatorType |
| int | generatorDirection |
| long | throwned_by_npc |
| LVL_Npc * | throwned_by_npc_obj |
| long | throwned_by_player |
| LVL_Player * | throwned_by_player_obj |
| QList< LVL_Npc * > * | buddies_list |
| bool | buddies_updated |
| LVL_Npc * | buddies_leader |
| bool | isLuaNPC |
| int | health |
Public Attributes inherited from PGE_Phys_Object | |
| double | colliding_xSpeed |
| double | colliding_ySpeed |
| bool | collided_slope |
| float | collided_slope_angle_ratio |
| bool | collided_slope_celling |
| float | collided_slope_angle_ratio_celling |
| PGE_Phys_Object_Phys | phys_setup |
| Settings of physics. | |
| PGE_RectF | posRect |
| Real body geometry and position. | |
| double | _accelX |
| Delta of X velocity in a second. | |
| double | _accelY |
| Delta of Y velocity in a second. | |
| double | _velocityX |
| current X speed (pixels per 1/65 of second) | |
| double | _velocityY |
| current Y speed (pixels per 1/65 of second) | |
| double | _velocityX_prev |
| X speed before last itertion step (pixels per 1/65 of second) | |
| double | _velocityY_prev |
| Y speed before last itertion step (pixels per 1/65 of second) | |
| double | _velocityX_add |
| additional X acceleration | |
| double | _velocityY_add |
| additional Y acceleration | |
| double | _posX |
| Synchronized with R-Tree position. | |
| double | _posY |
| Synchronized with R-Tree position. | |
| double | _width |
| Synchronized with R-Tree Width. | |
| double | _height |
| Synchronized with R-Tree Height. | |
| double | _width_half |
| Half of width. | |
| double | _height_half |
| Half of height. | |
| double | _realWidth |
| Width prepared to synchronize with R-Tree. | |
| double | _realHeight |
| Height prepared to synchronize with R-Tree. | |
| LVL_Section * | _parentSection |
| int | type |
| int | collide_player |
| int | collide_npc |
| bool | slippery_surface |
| bool | isRectangle |
| PGE_Texture | texture |
| GLuint | texId |
| GLdouble | z_index |
| bool | _is_visible |
Additional Inherited Members | |
Static Public Member Functions inherited from PGE_Phys_Object | |
| static float | SMBXTicksToTime (float ticks) |
Static Public Attributes inherited from PGE_Phys_Object | |
| static const float | _smbxTickTime =1000.f/65.f |
| void LVL_Npc::Activate | ( | ) |
< Allow deactivation of this NPC when it going offscreen
| void LVL_Npc::setSpriteWarp | ( | float | depth, |
| LVL_Npc::WarpingSide | direction = WARP_BOTTOM, |
||
| bool | resizedBody = false |
||
| ) |
setSpriteWarp Changes warping state of a sprite
| depth | |
| direction |
| void LVL_Npc::setWarpSpawn | ( | LVL_Npc::WarpingSide | side = WARP_TOP | ) |
< Forcing to refresh physical environment
|
virtual |
Layers
Reimplemented from PGE_Phys_Object.
| QVector<BasicDetector* > LVL_Npc::detectors |
Detects contacted elements.
Entire list of all detectors
| QList<ContactDetector > LVL_Npc::detectors_contact |
Detects is player(s) are enters into specific area relative to NPC's center.
Entire list of all detectors
1.8.7