Angel 3.2
A 2D Game Prototyping Engine
Public Member Functions | Protected Attributes | List of all members
Sentient Class Reference
+ Inheritance diagram for Sentient:

Public Member Functions

virtual void Update (float dt)
 
virtual void Render ()
 
PathFinderGetPathfinder ()
 
virtual void OnNamedEvent (const String &)
 
virtual void InitializeBrain ()
 
virtual void StartBrain ()
 
- Public Member Functions inherited from PhysicsActor
 PhysicsActor ()
 
virtual ~PhysicsActor ()
 
void SetDensity (float density)
 
void SetFriction (float friction)
 
void SetRestitution (float restitution)
 
void SetShapeType (eShapeType shapeType)
 
void SetIsSensor (bool isSensor)
 
void SetGroupIndex (int groupIndex)
 
void SetFixedRotation (bool fixedRotation)
 
virtual void InitPhysics ()
 
virtual void CustomInitPhysics ()
 
void ApplyForce (const Vector2 &force, const Vector2 &point)
 
void ApplyLocalForce (const Vector2 &force, const Vector2 &point)
 
void ApplyTorque (float torque)
 
void ApplyLinearImpulse (const Vector2 &impulse, const Vector2 &point)
 
void ApplyAngularImpulse (float impulse)
 
b2Body * GetBody ()
 
void ResetBody ()
 
void SetSize (float x, float y=-1.f)
 
void SetDrawSize (float x, float y=-1.f)
 
void SetPosition (float x, float y)
 
void SetPosition (const Vector2 &pos)
 
void SetRotation (float rotation)
 
void MoveTo (const Vector2 &newPosition, float duration, String onCompletionMessage="")
 
void RotateTo (float newRotation, float duration, String onCompletionMessage="")
 
void ChangeSizeTo (const Vector2 &newSize, float duration, String onCompletionMessage="")
 
void ChangeSizeTo (float newSize, float duration, String onCompletionMessage="")
 
virtual const String GetClassName () const
 
- Public Member Functions inherited from Actor
 Actor ()
 
virtual ~Actor ()
 
void SetSize (float x, float y=-1.f)
 
void SetSize (const Vector2 &newSize)
 
const Vector2GetSize () const
 
const BoundingBox GetBoundingBox () const
 
const Vector2GetPosition () const
 
const float GetRotation () const
 
void SetColor (float r, float g, float b, float a=1.0f)
 
void SetColor (const Color &color)
 
const ColorGetColor () const
 
void SetAlpha (float newAlpha)
 
const float GetAlpha () const
 
virtual void SetDrawShape (actorDrawShape drawShape)
 
const actorDrawShapeGetDrawShape () const
 
void UseDisplayList (int listIndex)
 
void MoveTo (const Vector2 &newPosition, float duration, bool smooth=false, String onCompletionMessage="")
 
void RotateTo (float newRotation, float duration, bool smooth=false, String onCompletionMessage="")
 
void ChangeColorTo (const Color &newColor, float duration, bool smooth=false, String onCompletionMessage="")
 
void ChangeSizeTo (const Vector2 &newSize, float duration, bool smooth=false, String onCompletionMessage="")
 
void ChangeSizeTo (float newSize, float duration, bool smooth=false, String onCompletionMessage="")
 
int GetSpriteTexture (int frame=0) const
 
bool SetSprite (const String &filename, int frame=0, GLint clampmode=GL_CLAMP, GLint filtermode=GL_LINEAR, bool optional=false)
 
void ClearSpriteInfo ()
 
void LoadSpriteFrames (const String &firstFilename, GLint clampmode=GL_CLAMP, GLint filtermode=GL_LINEAR)
 
void PlaySpriteAnimation (float delay, spriteAnimationType animType=SAT_Loop, int startFrame=-1, int endFrame=-1, const char *animName=NULL)
 
void SetSpriteFrame (int frame)
 
int GetSpriteFrame () const
 
const bool IsSpriteAnimPlaying () const
 
virtual void AnimCallback (String animName)
 
void SetUVs (const Vector2 &lowleft, const Vector2 &upright)
 
void GetUVs (Vector2 &lowleft, Vector2 &upright) const
 
const bool IsTagged (const String &tag)
 
void Tag (const String &newTag)
 
void Untag (const String &oldTag)
 
const StringSet & GetTags () const
 
const String & SetName (String newName)
 
const String & GetName () const
 
virtual void ReceiveMessage (Message *message)
 
void SetLayer (int layerIndex)
 
void SetLayer (const String &layerName)
 
virtual void LevelUnloaded ()
 
ActorGetSelf ()
 
- Public Member Functions inherited from Renderable
 Renderable ()
 
virtual ~Renderable ()
 
void Destroy ()
 
bool IsDestroyed ()
 
int GetLayer ()
 

Protected Attributes

PathFinder _pathFinder
 
AIBrain _brain
 
- Protected Attributes inherited from PhysicsActor
b2Body * _physBody
 
float _density
 
float _friction
 
float _restitution
 
eShapeType _shapeType
 
bool _isSensor
 
int _groupIndex
 
bool _fixedRotation
 
- Protected Attributes inherited from Actor
Vector2 _size
 
Vector2 _position
 
Color _color
 
float _rotation
 
float _UV [8]
 
actorDrawShape _drawShape
 
int _spriteCurrentFrame
 
int _spriteNumFrames
 
float _spriteFrameDelay
 
float _spriteCurrentFrameDelay
 
int _spriteTextureReferences [MAX_SPRITE_FRAMES]
 
spriteAnimationType _spriteAnimType
 
int _spriteAnimStartFrame
 
int _spriteAnimEndFrame
 
int _spriteAnimDirection
 
int _displayListIndex
 
StringSet _tags
 
String _name
 
String _currentAnimName
 
- Protected Attributes inherited from Renderable
bool _deleteMe
 
int _layer
 

Additional Inherited Members

- Public Types inherited from PhysicsActor
enum  eShapeType { SHAPETYPE_BOX, SHAPETYPE_CIRCLE }
 
- Static Public Member Functions inherited from Actor
static Actor *const GetNamed (const String &nameLookup)
 
static ActorCreate (const String &archetype)
 
static void SetScriptCreatedActor (Actor *a)
 
- Protected Member Functions inherited from PhysicsActor
virtual void InitShape (b2Shape *)
 
- Static Protected Attributes inherited from Actor
static const float _squareVertices []
 
static float _circleVertices []
 
static float _circleTextureCoords []
 
static std::map< String, Actor * > _nameList
 
static Actor_scriptCreatedActor = NULL
 

Detailed Description

Definition at line 37 of file Sentient.h.

Member Function Documentation

void Sentient::Update ( float  dt)
virtual

A function which makes the necessary updates to the Actor. The base implementation just updates the animations and intervals, but a subclass override can perform whatever extra magic is necessary. Make sure to call the base class's Update if you subclass.

Parameters
dtThe amount of time that's elapsed since the beginning of the last frame.

Reimplemented from Actor.

Definition at line 42 of file Sentient.cpp.

void Sentient::Render ( )
virtual

A function to draw the Actor to the screen. By default, this does the basic drawing based on the texture, color, shape, size, position, and rotation that have been applied to the Actor. Can be overridden in a subclass if necessary.

This will get called on every Actor once per frame, after the Update.

Reimplemented from Actor.

Definition at line 48 of file Sentient.cpp.


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