444444444444

Dependencies:   mbed CXK

Embed: (wiki syntax)

« Back to documentation index

cxkEngine Class Reference

cxkEngine Class Reference

cxkEngine Class More...

#include <cxkEngine.h>

Public Member Functions

 cxkEngine ()
 Constructor.
 ~cxkEngine ()
 Destrctor.
void init (int CXK_width, int CXK_height, int ball_size, int speed)
 Set the cxkEngineinit @ param value of the cxk feature of the CXK file (CXK_width, CXK_height) @ param value of the ball size of the ballfile (ball_size) @ param value of the move speed of the CXKand ball file (speed)
void read_input (Gamepad &pad)
 Set the cxkEread_Iinput @ details use CXK and BAll to read the value of direction and maganitude of joystick.
void update (Gamepad &pad)
 Set the cxkEupdate @ details updated the d and vara from the read_input.
void draw (N5110 &lcd)
 Set the CXKdraw @ param the score player get (cxkp_score) @ details draw the wall and basket to the game.

Detailed Description

cxkEngine Class

the diagram of the ball and others

Author:
Zhang Xinyu EE of SWJTU &leeds joint school
Date:
MAY 2019

Definition at line 18 of file cxkEngine.h.


Constructor & Destructor Documentation

cxkEngine (  )

Constructor.

Definition at line 3 of file cxkEngine.cpp.

~cxkEngine (  )

Destrctor.

Definition at line 8 of file cxkEngine.cpp.


Member Function Documentation

void draw ( N5110 lcd )

Set the CXKdraw @ param the score player get (cxkp_score) @ details draw the wall and basket to the game.

Definition at line 38 of file cxkEngine.cpp.

void init ( int  CXK_width,
int  CXK_height,
int  ball_size,
int  speed 
)

Set the cxkEngineinit @ param value of the cxk feature of the CXK file (CXK_width, CXK_height) @ param value of the ball size of the ballfile (ball_size) @ param value of the move speed of the CXKand ball file (speed)

Definition at line 13 of file cxkEngine.cpp.

void read_input ( Gamepad pad )

Set the cxkEread_Iinput @ details use CXK and BAll to read the value of direction and maganitude of joystick.

Definition at line 32 of file cxkEngine.cpp.

void update ( Gamepad pad )

Set the cxkEupdate @ details updated the d and vara from the read_input.

Definition at line 60 of file cxkEngine.cpp.