Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Bullets.h
00001 /** Bullets Class: 00002 @brief - Defines instances of bullets for a 2D shooter game 00003 00004 @author Albert Tan Muligan, Student at University of Leeds 00005 @date May 2020 00006 00007 00008 */ 00009 00010 #include "mbed.h" 00011 #include "N5110.h" 00012 #include "Gamepad.h" 00013 class Bullets 00014 { 00015 00016 public: 00017 /** 00018 * @brief Constructor that sets inital x and y 00019 * @param x and y @details x and y in pixels (max x = 84, y = 48) 00020 */ 00021 Bullets(int ex, int wy, int d); 00022 ~Bullets(); 00023 void draw(N5110 &lcd); 00024 void update(); 00025 ///Y value accessor 00026 int get_y(); 00027 ///X value accessor 00028 int get_x(); 00029 ///"Dead" mutator puts the x and y at 1000 so it's off-screen. 00030 void dead(); 00031 private: 00032 int _x; 00033 int _y; 00034 int _dir; 00035 };
Generated on Tue Sep 20 2022 19:04:42 by
