1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- //
- // RedWise.hpp
- // MyGameCpp
- //
- // Created by 余纪柱 on 2020/12/22.
- //
- #ifndef RedWise_hpp
- #define RedWise_hpp
- // cpp include
- #include <math/Vec3.h>
- #include <set>
- #include <string>
- #include <unordered_map>
- #include <unordered_set>
- #include <vector>
- class RedWise;
- using namespace std;
- RedWise* _redwise();
- #pragma mark 声明枚举_RedWise API 返回类型
- enum class RWResultType
- {
- None,
- EventForcePost, // 强制使事件活动
- EventRuning, // 事件活动中
- EventRest, // 事件空闲中
- EventNotFind, // 事件不存在
- EventFind, // 找到事件
- ResetSuccess, // 重置成功
- ResetFail, // 重置失败
- SetAppNameSucess, // 设置成功
- SetAppNameFail, // 设置失败
- SetAppNameFailWhenRelease, // 正式版App拒绝设置AppName,因其使用场景为debug
- RetainBankSuccess,
- RetainBankFail,
- NameStringEmpty // 检测到作为名字使用的串为空
- };
- struct RWReturn
- {
- bool findEvent = false;
- RWResultType type = RWResultType::None;
- std::uint32_t eventID = 0;
-
-
- std::string error;
- std::string warn;
- };
- struct RWRedreamParam
- {
- string name;
- float value = 0;
- float min = 0.f;
- float max = 100.f;
- RWRedreamParam() {};
- RWRedreamParam(const string& name, float value, float min, float max)
- : name(name), value(value), min(min), max(max) {}
- };
- using namespace std;
- class RedWise
- {
- public:
-
- public:
- static RedWise* RW;
- static RedWise* getInstance(); ///单例
- bool _init();
- RWReturn postEvent(string eventName, bool forcePostEvent = true, function<void(void)> onEventEnd = NULL){
- RWReturn rer;
- return rer;
- }; /// 常用
- RWReturn postEventByBnk(string bnkPath,string eventName,vector<RWRedreamParam> params, bool forcePostEvent){
- RWReturn result;
- return result;
- };
- RWReturn postEventByBnk(string bnkPath,string eventName,function<void(void)> onEventEnd = NULL){
- RWReturn result;
- return result;
- };
- };
- #endif /* RedWise_hpp */
|