From 04b213d4e20ca4e7ea66b059329771f6fd36c650 Mon Sep 17 00:00:00 2001 From: ClarkeCode Date: Fri, 14 Apr 2023 23:41:57 -0400 Subject: Removing TestSingleton Extracted game advancement behaviour to separate class --- extension/src/TestSingleton.cpp | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 extension/src/TestSingleton.cpp (limited to 'extension/src/TestSingleton.cpp') diff --git a/extension/src/TestSingleton.cpp b/extension/src/TestSingleton.cpp deleted file mode 100644 index d9e2b03..0000000 --- a/extension/src/TestSingleton.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "TestSingleton.hpp" - -#include -#include - -using namespace godot; -using namespace OpenVic2; - -TestSingleton* TestSingleton::singleton = nullptr; - -void TestSingleton::_bind_methods() -{ - ClassDB::bind_method(D_METHOD("hello_singleton"), &TestSingleton::hello_singleton); -} - -TestSingleton* TestSingleton::get_singleton() -{ - return singleton; -} - -TestSingleton::TestSingleton() -{ - ERR_FAIL_COND(singleton != nullptr); - singleton = this; -} - -TestSingleton::~TestSingleton() -{ - ERR_FAIL_COND(singleton != this); - singleton = nullptr; -} - -void TestSingleton::hello_singleton() -{ - UtilityFunctions::print("Hello GDExtension Singleton!"); -} \ No newline at end of file -- cgit v1.2.3-56-ga3b1