generated from 32blit/32blit-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPowerUp.hpp
45 lines (39 loc) · 915 Bytes
/
PowerUp.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* PowerUp.hpp - part of 32Blox (revised edition!)
*
* Copyright (C) 2020 Pete Favelle <32blit@ahnlak.com>
*
* This file is released under the MIT License; see LICENSE for details
*
* The PowerUp object is a randomly-dropped power up thingie.
*/
#ifndef _POWERUP_HPP_
#define _POWERUP_HPP_
typedef enum
{
POWERUP_SPEED,
POWERUP_SLOW,
POWERUP_STICKY,
POWERUP_SHRINK,
POWERUP_GROW,
POWERUP_MULTI,
POWERUP_EXTRA,
POWERUP_MAX
} powerup_type_t;
class PowerUp
{
private:
blit::Vec2 location;
blit::Vec2 vector;
powerup_type_t powerup_type;
blit::Point get_render_location( void );
public:
PowerUp( blit::Point );
blit::Rect get_bounds( void );
powerup_type_t get_type( void );
void update( void );
void render( void );
void remove( void );
};
#endif /* _POWERUP_HPP_ */
/* End of PowerUp.hpp */