From f0807fc44dde14531759306317611bab87c8fccf Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 19 Oct 2020 09:13:58 +0800 Subject: +gamelab proj --- Runtime/Utilities/UIDGenerator.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Runtime/Utilities/UIDGenerator.h (limited to 'Runtime/Utilities/UIDGenerator.h') diff --git a/Runtime/Utilities/UIDGenerator.h b/Runtime/Utilities/UIDGenerator.h new file mode 100644 index 0000000..81918f0 --- /dev/null +++ b/Runtime/Utilities/UIDGenerator.h @@ -0,0 +1,20 @@ +#ifndef UID_GENERATOR_H +#define UID_GENERATOR_H + +class UIDGenerator +{ +public: + UIDGenerator(int from = 0) + : m_Index(from) + { + }; + ~UIDGenerator(){}; + + int GenUID(){return m_Index++;}; + +private: + int m_Index; + +}; + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0