PGE Engine
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
Binding_Level_ClassWrapper_LVL_NPC Class Reference
Inheritance diagram for Binding_Level_ClassWrapper_LVL_NPC:
LVL_Npc PGE_Phys_Object

Public Member Functions

virtual void lua_onActivated ()
 
virtual void lua_onLoop (float tickTime)
 
virtual void lua_onInit ()
 
virtual void lua_onKill (int damageReason)
 
virtual void lua_onHarm (int damage, int damageReason)
 
virtual void lua_onTransform (long id)
 
- Public Member Functions inherited from LVL_Npc
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 ()
 
PlayerPosDetectorlua_installPlayerPosDetector ()
 Player position detectors (should have alone copy!)
 
InAreaDetectorlua_installInAreaDetector (float left, float top, float right, float bottom, luabind::adl::object filters)
 Is player touches selected relative area;.
 
ContactDetectorlua_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_NpcthrownedByNpcObj ()
 
long thrownedByPlayer ()
 
LVL_PlayerthrownedByPlayerObj ()
 
void buildBuddieGroup ()
 
void updateBuddies (float tickTime)
 
void buildLeaf (QList< LVL_Npc * > &needtochec, QList< LVL_Npc * > *&list, LVL_Npc *leader)
 
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_Npclua_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_ObjectnearestBlock (QVector< PGE_Phys_Object * > &blocks)
 
PGE_Phys_ObjectnearestBlockY (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_Sectionsct ()
 
virtual GLdouble zIndex ()
 
virtual bool isVisible ()
 
virtual void update ()
 
bool isPaused ()
 
void setPaused (bool p)
 

Static Public Member Functions

static void def_lua_onActivated (LVL_Npc *base)
 
static void def_lua_onLoop (LVL_Npc *base, float tickTime)
 
static void def_lua_onInit (LVL_Npc *base)
 
static void def_lua_onKill (LVL_Npc *base, int damageReason)
 
static void def_lua_onHarm (LVL_Npc *base, int damage, int damageReason)
 
static void def_lua_onTransform (LVL_Npc *base, long id)
 
static luabind::scope bindToLua ()
 
- Static Public Member Functions inherited from PGE_Phys_Object
static float SMBXTicksToTime (float ticks)
 

Additional Inherited Members

- Public Types inherited from LVL_Npc
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 Attributes inherited from LVL_Npc
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_npcsetup
 
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< BasicDetectordetectors_dummy
 dummy detectors made directly from a base class, for a some tests
 
PlayerPosDetector detector_player_pos
 
QList< InAreaDetectordetectors_inarea
 Detects position and direction of nearest player.
 
QList< ContactDetectordetectors_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_Npcevent_queue
 
bool isGenerator
 
float generatorTimeLeft
 
int generatorType
 
int generatorDirection
 
long throwned_by_npc
 
LVL_Npcthrowned_by_npc_obj
 
long throwned_by_player
 
LVL_Playerthrowned_by_player_obj
 
QList< LVL_Npc * > * buddies_list
 
bool buddies_updated
 
LVL_Npcbuddies_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
 
- Static Public Attributes inherited from PGE_Phys_Object
static const float _smbxTickTime =1000.f/65.f
 

The documentation for this class was generated from the following files: