From 97a794408714474873d1e9271a7ba0a15585ffdf Mon Sep 17 00:00:00 2001 From: Nomango <569629550@qq.com> Date: Mon, 5 Mar 2018 00:17:33 +0800 Subject: [PATCH] fixed bugs --- core/Base/Game.cpp | 5 ++--- core/Manager/TimerManager.cpp | 2 +- core/ecommon.h | 2 +- project/vs2017/Easy2D.vcxproj | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/Base/Game.cpp b/core/Base/Game.cpp index cdae3d6d..5e0e264d 100644 --- a/core/Base/Game.cpp +++ b/core/Base/Game.cpp @@ -102,15 +102,14 @@ int e2d::Game::run() // 判断是否达到了刷新状态 if (Time::__isReady()) { + TimerManager::__update(); // 定时器管理器执行程序 + ActionManager::__update(); // 动作管理器执行程序 while (Time::__isReady()) { Input::__updateDeviceState(); // 获取用户输入 SceneManager::__update(); // 更新场景内容 Time::__updateLast(); // 刷新时间信息 } - - TimerManager::__update(); // 定时器管理器执行程序 - ActionManager::__update(); // 动作管理器执行程序 Renderer::__render(); // 渲染游戏画面 } else diff --git a/core/Manager/TimerManager.cpp b/core/Manager/TimerManager.cpp index 74a9928f..18a9af38 100644 --- a/core/Manager/TimerManager.cpp +++ b/core/Manager/TimerManager.cpp @@ -34,7 +34,7 @@ void e2d::TimerManager::__update() void e2d::TimerManager::add(double timeOut, TimerCallback callback) { - auto pTimer = new Timer(L"", callback, timeOut, 1, false, true); + auto pTimer = new Timer(callback, timeOut, 1, false, true); pTimer->start(); } diff --git a/core/ecommon.h b/core/ecommon.h index 8f421e7b..591283bb 100644 --- a/core/ecommon.h +++ b/core/ecommon.h @@ -669,7 +669,7 @@ typedef VoidFunction TimerCallback; typedef VoidFunction ButtonCallback; #ifndef CreateCallback - #define CreateCallback(func, pointer) std::bind(&func, pointer) + #define CreateCallback(pointer, func) std::bind(&func, pointer) #endif diff --git a/project/vs2017/Easy2D.vcxproj b/project/vs2017/Easy2D.vcxproj index 8eb9ee9c..6d0d5d6f 100644 --- a/project/vs2017/Easy2D.vcxproj +++ b/project/vs2017/Easy2D.vcxproj @@ -101,7 +101,7 @@ Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true - EditAndContinue + None false