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