wavelength 1.0.0
Loading...
Searching...
No Matches
buttoncondition.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 ~ButtonCondition() override = default;
22
23 explicit ButtonCondition(DataArray *pCondition) : mMask(1 << pCondition->Int(1)) {
24 }
25
33 bool Test() override {
34 return (TheTriggerMgr.GetButtons() & mMask) != 0;
35 }
36
37private:
38 int mMask;
39};
~ButtonCondition() override=default
Destroy the object.
bool Test() override
Test the condition.
Definition buttoncondition.h:33
ButtonCondition(DataArray *pCondition)
Definition buttoncondition.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.