Angel 3.2
A 2D Game Prototyping Engine
Public Member Functions | List of all members
FullScreenActor Class Reference

An Actor which takes up the whole drawing space. More...

#include <FullScreenActor.h>

+ Inheritance diagram for FullScreenActor:

Public Member Functions

 FullScreenActor ()
 
void SetLock (bool locked)
 
const bool IsLocked ()
 
virtual void ReceiveMessage (Message *message)
 
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
 
virtual void SetPosition (float x, float y)
 
virtual void SetPosition (const Vector2 &pos)
 
const Vector2GetPosition () const
 
virtual void SetRotation (float rotation)
 
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
 
void SetLayer (int layerIndex)
 
void SetLayer (const String &layerName)
 
virtual void Update (float dt)
 
virtual void Render ()
 
virtual void LevelUnloaded ()
 
ActorGetSelf ()
 
- Public Member Functions inherited from Renderable
 Renderable ()
 
virtual ~Renderable ()
 
void Destroy ()
 
bool IsDestroyed ()
 
int GetLayer ()
 

Additional Inherited Members

- 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 Renderable
virtual void PreDestroy ()
 
- 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
 
- 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

A FullScreenActor will resize itself whenever the size of the drawing space changes. This makes it useful for backdrops, curtains, splash screens, etc.

Definition at line 39 of file FullScreenActor.h.

Constructor & Destructor Documentation

FullScreenActor::FullScreenActor ( )

The constructor subscribes the Actor to CameraChange messages and does the initial orientation to the camera.

Definition at line 36 of file FullScreenActor.cpp.

Member Function Documentation

void FullScreenActor::SetLock ( bool  locked)

You can lock a FullScreenActor to keep it from tracking the changes to the drawing area or camera. When you unlock it, it will snap back to taking up the whole screen.

Parameters
lockedwhether or not the FullScreenActor should continue to track camera changes

Definition at line 43 of file FullScreenActor.cpp.

const bool FullScreenActor::IsLocked ( )

To check on the lock status.

Returns
whether or not this FullScreenActor is currently tracking the camera

Definition at line 52 of file FullScreenActor.cpp.

void FullScreenActor::ReceiveMessage ( Message message)
virtual

An implementation of the MessageListener interface, which listens for CameraChange messages and responds appropriately.

See Also
MessageListener
Parameters
messageThe message getting delivered.

Reimplemented from Actor.

Definition at line 57 of file FullScreenActor.cpp.

virtual const String FullScreenActor::GetClassName ( ) const
inlinevirtual

Used by the SetName function to create a basename for this class. Overridden from Actor::GetClassName.

Returns
The string "FullScreenActor"

Reimplemented from Actor.

Definition at line 80 of file FullScreenActor.h.


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