You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
551 B
C
24 lines
551 B
C
6 years ago
|
#pragma once
|
||
|
|
||
|
#include "enums.h"
|
||
|
#include "game_element.h"
|
||
6 years ago
|
#include "bullet.h"
|
||
6 years ago
|
|
||
6 years ago
|
//Ship sprite displayed over background
|
||
6 years ago
|
class Ship : public GameElement {
|
||
|
public:
|
||
6 years ago
|
ALLEGRO_BITMAP* sprite; //loads a sprite rather than a primitive
|
||
6 years ago
|
|
||
6 years ago
|
bool fired; //no longer used
|
||
6 years ago
|
|
||
6 years ago
|
Ship();
|
||
6 years ago
|
|
||
6 years ago
|
//implementing virtual methods
|
||
6 years ago
|
void reset_pos(float x, float y);
|
||
|
void draw();
|
||
|
void move(Direction dir);
|
||
6 years ago
|
Hitbox get_hitbox();
|
||
6 years ago
|
|
||
6 years ago
|
void set_props(ALLEGRO_BITMAP* _sprite, Behavior _behavior); //Sets ship properties
|
||
|
Bullet fire(); //Creates a new bullet
|
||
6 years ago
|
};
|