blender/source/gameengine/Physics/common/PHY_ICharacter.h
Thomas Szepe 83721682bb BGE: Change character jumping to char
* Change the character jumping variables and methods from int to char.
* Limit the maxJumps integer value from 0 to 255.
* Allow to set the minimum jump amount to 0.

Reviewers: panzergame, lordloki, moguri

Reviewed By: lordloki, moguri

Subscribers: agoose77

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1305
2015-10-11 15:41:40 +02:00

40 lines
814 B
C++

/** \file PHY_ICharacter.h
* \ingroup phys
*/
#ifndef __PHY_ICHARACTER_H__
#define __PHY_ICHARACTER_H__
//PHY_ICharacter provides a generic interface for "character" controllers
#ifdef WITH_CXX_GUARDEDALLOC
#include "MEM_guardedalloc.h"
#endif
class PHY_ICharacter
{
public:
virtual ~PHY_ICharacter(){};
virtual void Jump()= 0;
virtual bool OnGround()= 0;
virtual float GetGravity()= 0;
virtual void SetGravity(float gravity)= 0;
virtual unsigned char GetMaxJumps() = 0;
virtual void SetMaxJumps(unsigned char maxJumps) = 0;
virtual unsigned char GetJumpCount() = 0;
virtual void SetWalkDirection(const class MT_Vector3& dir)=0;
virtual MT_Vector3 GetWalkDirection()=0;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_ICharacter")
#endif
};
#endif //__PHY_ICHARACTER_H__