wavelength 1.0.0
Loading...
Searching...
No Matches
powerupcondition.h
Go to the documentation of this file.
1#pragma once
2
4#include "game/triggermgr.h"
5#include "script/dataarray.h"
6
14public:
21 ~PowerupCondition() override = default;
22
23 explicit PowerupCondition(DataArray *pCondition) : mPowerup(pCondition->Int(1)) {
24 }
25
33 bool Test() override {
34 return TheTriggerMgr.GetPowerup() == mPowerup;
35 }
36
37private:
38 int mPowerup;
39};
Reference-counted array of script data nodes.
Definition dataarray.h:20
bool Test() override
Test the condition.
Definition powerupcondition.h:33
PowerupCondition(DataArray *pCondition)
Definition powerupcondition.h:23
~PowerupCondition() override=default
Destroy the object.
A test a trigger makes before its actions start.
Definition triggercondition.h:11
TriggerMgr TheTriggerMgr
The trigger registry.