Sizhe Lin / Mbed 2 deprecated missile_command_Sizhe_Lin

Dependencies:   4DGL-uLCD-SE SDFileSystem mbed wave_player

Fork of missile_command by ECE 2035 TA

Embed: (wiki syntax)

« Back to documentation index

missile_public.h File Reference

missile_public.h File Reference

Go to the source code of this file.

Data Structures

struct  MISSILE
 The structure to store the information of a missile. More...

Enumerations

enum  MISSILE_STATUS { MISSILE_EXPLODED = 2, MISSILE_ACTIVE = 1, MISSILE_DEACTIVE = 0 }
 

The missile status.

More...

Functions

void missile_generator (void)
 This function draw the missiles onto the screen Call missile_generator() repeatedly in your game-loop.
void missile_set_exploded (int index)
 The function set the status of missile to be MISSILE_EXPLODED.
MISSILE missile_get_info (int index)
 Get the information of a missile.
void set_missile_speed (int speed)
 Set the speed of missiles, Speed has range of 1-8 with 1 being fastest and 8 being slowest.
void set_missile_interval (int interval)
 Set the interval that the missiles fire, interval has range of 1-100 with 1 being fired in very quick succession and 100 being fired very slowly after one another.

Detailed Description

Definition in file missile_public.h.


Enumeration Type Documentation

The missile status.

Enumerator:
MISSILE_EXPLODED 

missile has been destroyed

MISSILE_ACTIVE 

missile is active

MISSILE_DEACTIVE 

missile is no longer active

Definition at line 27 of file missile_public.h.


Function Documentation

void missile_generator ( void   )

This function draw the missiles onto the screen Call missile_generator() repeatedly in your game-loop.

ex: main()

Definition at line 31 of file missile.cpp.

MISSILE missile_get_info ( int  index )

Get the information of a missile.

Parameters:
indexThe index in missile_record. It must be smaller than MAX_NUM_MISSILE.
Returns:
The structure of missile information

Definition at line 59 of file missile.cpp.

void missile_set_exploded ( int  index )

The function set the status of missile to be MISSILE_EXPLODED.

Parameters:
indexThe index in missile_record. It must be smaller than MAX_NUM_MISSILE.

Definition at line 67 of file missile.cpp.

void set_missile_interval ( int  interval )

Set the interval that the missiles fire, interval has range of 1-100 with 1 being fired in very quick succession and 100 being fired very slowly after one another.

Definition at line 51 of file missile.cpp.

void set_missile_speed ( int  speed )

Set the speed of missiles, Speed has range of 1-8 with 1 being fastest and 8 being slowest.

Definition at line 43 of file missile.cpp.