wavelength 1.0.0
Loading...
Searching...
No Matches
barcondition.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 ~BarCondition() override = default;
22
23 explicit BarCondition(DataArray *pCondition)
24 : mLow(pCondition->Int(1)), mHigh(pCondition->Int(2)) {
25 }
26
34 bool Test() override {
35 return mLow <= TheTriggerMgr.GetBar() && TheTriggerMgr.GetBar() <= mHigh;
36 }
37
38private:
39 int mLow;
40 int mHigh;
41};
~BarCondition() override=default
Destroy the object.
bool Test() override
Test the condition.
Definition barcondition.h:34
BarCondition(DataArray *pCondition)
Definition barcondition.h:23
Reference-counted array of script data nodes.
Definition dataarray.h:20
A test a trigger makes before its actions start.
Definition triggercondition.h:11
TriggerMgr TheTriggerMgr
The trigger registry.