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

A class to somewhat simulate the setup of an iOS app on the desktop. More...

#include <MobileSimulator.h>

+ Inheritance diagram for MobileSimulator:

Public Member Functions

virtual void Update (float dt)
 
virtual void MouseMotionEvent (Vec2i screenCoordinates)
 
virtual void MouseDownEvent (Vec2i screenCoordinates, MouseButtonInput button)
 
virtual void MouseUpEvent (Vec2i screenCoordinates, MouseButtonInput button)
 
- Public Member Functions inherited from Renderable
 Renderable ()
 
virtual ~Renderable ()
 
virtual void Render ()
 
void Destroy ()
 
bool IsDestroyed ()
 
int GetLayer ()
 

Additional Inherited Members

- Protected Member Functions inherited from Renderable
virtual void PreDestroy ()
 
- Protected Attributes inherited from Renderable
bool _deleteMe
 
int _layer
 
- Private Member Functions inherited from MouseListener
 MouseListener ()
 
virtual ~MouseListener ()
 
virtual void MouseWheelEvent (const Vector2 &scrollOffset)
 

Detailed Description

If you add this Renderable to the world, it'll pretend to be the mobile hardware, filling the same data structures that the real hardware would, meaning you can use this to prototype a lot of iOS gameplay without having the hardware immediately accessible.

You shouldn't actually have to call any of the methods on this class. Add it to the world and then use the interfaces defined in MultiTouch.h.

Definition at line 45 of file MobileSimulator.h.

Member Function Documentation

void MobileSimulator::Update ( float  dt)
virtual

This function gets called once per frame. Any game logic for an Actor should be done in this function, since it provides you with a dt for controlling rate of movement, animation, etc.

Parameters
dtThe amount of time (in seconds) that has elapsed since the last frame.

Reimplemented from Renderable.

Definition at line 79 of file MobileSimulator.cpp.

void MobileSimulator::MouseMotionEvent ( Vec2i  screenCoordinates)
virtual

Called whenever the player moves the mouse.

Parameters
screenCoordinatesThe new coordinates of the mouse in screen coordinates (pixels). Use the MathUtil::ScreenToWorld function if you want GL units.

Reimplemented from MouseListener.

Definition at line 94 of file MobileSimulator.cpp.

void MobileSimulator::MouseDownEvent ( Vec2i  screenCoordinates,
MouseButtonInput  button 
)
virtual

Called whenever the player presses down on a mouse button.

Parameters
screenCoordinatesThe new coordinates of the mouse in screen coordinates (pixels). Use the MathUtil::ScreenToWorld function if you want GL units.
buttonWhich button was pressed. Will be one of MOUSE_LEFT, MOUSE_MIDDLE, or MOUSE_RIGHT.

Reimplemented from MouseListener.

Definition at line 183 of file MobileSimulator.cpp.

void MobileSimulator::MouseUpEvent ( Vec2i  screenCoordinates,
MouseButtonInput  button 
)
virtual

Called whenever the player releases a mouse button.

Parameters
screenCoordinatesThe new coordinates of the mouse in screen coordinates (pixels). Use the MathUtil::ScreenToWorld function if you want GL units.
buttonWhich button was released. Will be one of MOUSE_LEFT, MOUSE_MIDDLE, or MOUSE_RIGHT.

Reimplemented from MouseListener.

Definition at line 219 of file MobileSimulator.cpp.


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