ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18jgb

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Aim Class Reference

Aim Class Reference

Aim class. More...

#include <Aim.h>

Public Member Functions

 Aim ()
 Constructor.
 ~Aim ()
 Destructor.
void init ()
 Initalises Aim.
void draw (N5110 &lcd, int state)
 Draws the spike baste on state.
void update (Gamepad &pad)
 update the position of the sprite using the joystick
Vector2D get_pos ()
 gets co-ordinates of the sprite @ return position vector
void set_pos (int x, int y)
 set co ordinates of sprite
void acc_control (FXOS8700CQ &acc)
 update the position of the sprite using the accelerometer

Detailed Description

Aim class.

cursor sprite

Author:
Joe Body, University of Leeds
Date:
May 2020

Definition at line 16 of file Aim.h.


Constructor & Destructor Documentation

Aim (  )

Constructor.

Definition at line 22 of file Aim.cpp.

~Aim (  )

Destructor.

Definition at line 27 of file Aim.cpp.


Member Function Documentation

void acc_control ( FXOS8700CQ &  acc )

update the position of the sprite using the accelerometer

Parameters:
accAccelerometer object

Definition at line 106 of file Aim.cpp.

void draw ( N5110 lcd,
int  state 
)

Draws the spike baste on state.

Parameters:
lcdN5110 object
intstate

Definition at line 43 of file Aim.cpp.

Vector2D get_pos (  )

gets co-ordinates of the sprite @ return position vector

Definition at line 133 of file Aim.cpp.

void init (  )

Initalises Aim.

Definition at line 33 of file Aim.cpp.

void set_pos ( int  x,
int  y 
)

set co ordinates of sprite

Parameters:
intx
inty

Definition at line 138 of file Aim.cpp.

void update ( Gamepad pad )

update the position of the sprite using the joystick

Parameters:
padGamepad object

Definition at line 56 of file Aim.cpp.