ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18zc2

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Bullet Class Reference

Bullet Class Reference

Bullet Class. More...

#include <Bullet.h>

Public Member Functions

void init (int x, int size, int speed, int height)
 inialisation
void draw (N5110 &lcd)
 draw a bullet
void update (N5110 &lcd)
 update data
void set_velocity (Vector2D v)
 set velocity
Vector2D get_velocity ()
 speed data reading
Vector2D get_pos ()
 position reading
void set_pos (Vector2D p)
 position setting

Detailed Description

Bullet Class.

Author:
Chen Zirui, University of Leeds Bullet data and its functions list,initialisation,drawing,updating,positing setting and speed reading
Date:
May 2020

Definition at line 14 of file Bullet.h.


Member Function Documentation

void draw ( N5110 lcd )

draw a bullet

Definition at line 24 of file Bullet.cpp.

Vector2D get_pos (  )

position reading

Definition at line 62 of file Bullet.cpp.

Vector2D get_velocity (  )

speed data reading

Definition at line 56 of file Bullet.cpp.

void init ( int  x,
int  size,
int  speed,
int  height 
)

inialisation

Definition at line 4 of file Bullet.cpp.

void set_pos ( Vector2D  p )

position setting

Definition at line 68 of file Bullet.cpp.

void set_velocity ( Vector2D  v )

set velocity

Definition at line 50 of file Bullet.cpp.

void update ( N5110 lcd )

update data

Definition at line 36 of file Bullet.cpp.