Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Bullet.h"
- Bullet::Bullet(int x, int y, int xvel, int yvel) : Entity((SDL_Rect) {x, y, 5, 5}) {
- setXVel(xvel);
- setYVel(yvel);
- }
- void Bullet::render(SDL_Surface* surface) {
- SDL_Rect bounds = getBounds();
- SDL_FillRect(surface, &bounds, SDL_MapRGB(surface->format, 255, 0, 0));
- }
Advertisement
Add Comment
Please, Sign In to add comment