Logo
Task.h
1#pragma once
2
3#include "Types.h"
4#include "base/Task.h"
5
6using namespace System;
7using namespace System::Runtime::InteropServices;
8using namespace System::Text;
9
10namespace SharpKmyBase{
11
12 class subTask;
13
14 public ref class Task{
15
16 public:
17
19
20 Task();
21 void Release();
22 static void addTask(Task ^t);
23 static void removeTask(Task ^t);
24 static void run(bool flg);
25 static void onInitialize(void* managed);
26 static void onFinalize(void* managed);
27 static void onStartFixedUpdate(void* manged, float delta);
28 static void onAfterAnimate(void* manged, float delta);
29 static void onAfterSimulate(void* manged, float delta);
30 static void onUpdate(void* managed, float elapsed);
31 static void shutdown();
32 static void setTimeScale(float);
33 virtual void initialize();
34 virtual void update(float);
35 virtual void startFixedUpdate(float) {}
36 virtual void afterAnimate(float) {}
37 virtual void afterSimulate(float) {}
38 virtual void finalize();
39
40 System::Runtime::InteropServices::GCHandle handle;
41
42 };
43
44 class subTask : public kmyBase::Task {
45
46 public:
48
49 subTask(void* ptr);
50 const char* name()override;
51 void initialize()override;
52 void finalize()override;
53 void update(float elapsed)override;
54 void startFixedUpdate(float)override;
55 void afterAnimate(float)override;
56 void afterSimulate(float)override;
58 };
59
60}
Definition: Task.h:14
static void removeTask(Task ^t)
Definition: Task.cpp:41
static void onFinalize(void *managed)
Definition: Task.cpp:100
virtual void afterSimulate(float)
Definition: Task.h:37
subTask * obj
Definition: Task.h:18
static void onAfterSimulate(void *manged, float delta)
Definition: Task.cpp:91
void Release()
Definition: Task.cpp:19
virtual void finalize()
Definition: Task.cpp:115
static void setTimeScale(float)
Definition: Task.cpp:127
static void run(bool flg)
Definition: Task.cpp:48
virtual void initialize()
Definition: Task.cpp:109
virtual void startFixedUpdate(float)
Definition: Task.h:35
static void shutdown()
Definition: Task.cpp:27
static void addTask(Task ^t)
Definition: Task.cpp:34
static void onAfterAnimate(void *manged, float delta)
Definition: Task.cpp:82
virtual void update(float)
Definition: Task.cpp:121
virtual void afterAnimate(float)
Definition: Task.h:36
static void onInitialize(void *managed)
Definition: Task.cpp:55
static void onUpdate(void *managed, float elapsed)
Definition: Task.cpp:64
System::Runtime::InteropServices::GCHandle handle
Definition: Task.h:40
static void onStartFixedUpdate(void *manged, float delta)
Definition: Task.cpp:73
Task()
Definition: Task.cpp:11
Definition: Task.h:44
void afterAnimate(float) override
Definition: Task.cpp:162
const char * name() override
Definition: Task.cpp:139
void afterSimulate(float) override
Definition: Task.cpp:169
void * managedTask
Definition: Task.h:57
void update(float elapsed) override
Definition: Task.cpp:148
subTask(void *ptr)
Definition: Task.cpp:134
void startFixedUpdate(float) override
Definition: Task.cpp:155
void initialize() override
Definition: Task.cpp:177
USE_MEMORY_TRACKING
Definition: Task.h:47
void finalize() override
Definition: Task.cpp:184
Definition: Asset.cpp:6