summaryrefslogtreecommitdiff
path: root/src/KingSystem/ActorSystem/actBaseProcHandle.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2020-08-27 23:57:44 +0200
committerGitHub <noreply@github.com>2020-08-27 23:57:44 +0200
commitc90e29946fba60199d6fc981a4ec0db3dcacc1f4 (patch)
treeb6e4f487fd2a3a9db64f01b26fdb78e15d5b85dc /src/KingSystem/ActorSystem/actBaseProcHandle.cpp
parent3e7d90f5bfbc54797e142332a21209c3e3956275 (diff)
parent965d34c712d6372c5112e8d9943e48de622a9d5a (diff)
Merge pull request #3 from notyouraveragehooman/master
baseProcUnit setProc, actionSetisntEventFlag ctor dtor
Diffstat (limited to 'src/KingSystem/ActorSystem/actBaseProcHandle.cpp')
-rw-r--r--src/KingSystem/ActorSystem/actBaseProcHandle.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/KingSystem/ActorSystem/actBaseProcHandle.cpp b/src/KingSystem/ActorSystem/actBaseProcHandle.cpp
new file mode 100644
index 00000000..5603b5be
--- /dev/null
+++ b/src/KingSystem/ActorSystem/actBaseProcHandle.cpp
@@ -0,0 +1,29 @@
+#include "KingSystem/ActorSystem/actBaseProcHandle.h"
+
+namespace ksys::act {
+
+BaseProcHandle::BaseProcHandle() {
+ mUnit = nullptr;
+ mFlag = 0;
+}
+
+BaseProcHandle::~BaseProcHandle() {
+ if (mUnit) {
+ mUnit->deleteProc(0, this);
+ mUnit = nullptr;
+ }
+ mFlag = 0;
+}
+
+bool BaseProcHandle::procReady() {
+ return mUnit && mUnit->isReady();
+}
+
+BaseProc* BaseProcHandle::getProc() {
+ if (mUnit)
+ return mUnit->getProc();
+
+ return nullptr;
+}
+
+} // namespace ksys::act \ No newline at end of file