mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-24 03:54:34 -04:00
a8559bfbbc
* Update all CMakeLists of extensions to use clang-format * Run clang-format on all Extensions * Update GDCore CMakeLists.txt to add clang-format * Run clang-format on GDCore files * Update GDJS and GDCpp CMakeLists.txt to add clang-format * Run clang-format on GDCpp and GDJS files
30 lines
879 B
C++
30 lines
879 B
C++
/**
|
|
|
|
GDevelop - Timed Event Extension
|
|
Copyright (c) 2011-2016 Florian Rival (Florian.Rival@gmail.com)
|
|
This project is released under the MIT License.
|
|
*/
|
|
|
|
#include "TimedEventTools.h"
|
|
#include "GDCpp/Runtime/RuntimeScene.h"
|
|
#include "TimedEventsManager.h"
|
|
|
|
namespace GDpriv {
|
|
namespace TimedEvents {
|
|
|
|
signed long long GD_EXTENSION_API
|
|
UpdateAndGetTimeOf(RuntimeScene& scene, gd::String timedEventName) {
|
|
TimedEventsManager& manager = TimedEventsManager::managers[&scene];
|
|
manager.timedEvents[timedEventName].UpdateTime(
|
|
scene.GetTimeManager().GetElapsedTime());
|
|
return manager.timedEvents[timedEventName].GetTime();
|
|
}
|
|
|
|
void GD_EXTENSION_API Reset(RuntimeScene& scene, gd::String timedEventName) {
|
|
TimedEventsManager& manager = TimedEventsManager::managers[&scene];
|
|
manager.timedEvents[timedEventName].Reset();
|
|
}
|
|
|
|
} // namespace TimedEvents
|
|
} // namespace GDpriv
|