Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F627701
Sequence.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
735 B
Referenced Files
None
Subscribers
None
Sequence.h
View Options
//
// Created by Ido Mozes on 07/07/2019.
//
#ifndef SDL_GAME_SEQUENCE_H
#define SDL_GAME_SEQUENCE_H
#include
<cmath>
#include
"../Component.h"
constexpr
int
SEQUENCE_FINISHED
=
-1
;
class
Sequence
:
public
Component
{
int
amount
;
float
interval
;
float
timeToRecharge
;
int
amountReady
;
public
:
static
constexpr
ComponentType
type
=
ComponentType
::
SEQUENCE
;
Sequence
(
int
amount
,
float
amountPerSecond
,
float
delay
=
0
)
:
amount
(
amount
),
interval
(
60
/
amountPerSecond
),
timeToRecharge
(
delay
?
delay
:
interval
),
amountReady
(
delay
==
0
)
{}
int
getAmountReady
();
};
#endif
//SDL_GAME_SEQUENCE_H
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Nov 15, 2:34 AM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
127309
Default Alt Text
Sequence.h (735 B)
Attached To
Mode
R74 BloonsTD
Attached
Detach File
Event Timeline