fixed bugs

This commit is contained in:
Nomango 2018-03-05 00:17:33 +08:00
parent 9537a5b50d
commit 97a7944087
4 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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();
}

View File

@ -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

View File

@ -101,7 +101,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DebugInformationFormat>None</DebugInformationFormat>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>