John Aspinall / Mbed 2 deprecated SpaceGame

Dependencies:   4DGL-uLCD-SE PinDetect mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Shot.cpp Source File

Shot.cpp

00001 #include "Shot.h"
00002 
00003 Shot::Shot(int x, int y, int dy, int color, uLCD_4DGL *uLCD) {
00004     init(x,y,uLCD);
00005     _dy = dy;
00006     _color = color;
00007     setRadius(1);
00008 }
00009 int Shot::getY() {
00010     return _y;    
00011 }
00012 
00013 int Shot::getX() {
00014     return _x;    
00015 }
00016 
00017 void Shot::update() {
00018     _y = _y + _dy;
00019     drawCircle(0,0,_color);   
00020 }