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:33
static void onFinalize(void *managed)
Definition: Task.cpp:78
virtual void afterSimulate(float)
Definition: Task.h:37
subTask * obj
Definition: Task.h:18
static void onAfterSimulate(void *manged, float delta)
Definition: Task.cpp:71
void Release()
Definition: Task.cpp:17
virtual void finalize()
Definition: Task.cpp:90
static void setTimeScale(float)
Definition: Task.cpp:100
static void run(bool flg)
Definition: Task.cpp:38
virtual void initialize()
Definition: Task.cpp:85
virtual void startFixedUpdate(float)
Definition: Task.h:35
static void shutdown()
Definition: Task.cpp:23
static void addTask(Task ^t)
Definition: Task.cpp:28
static void onAfterAnimate(void *manged, float delta)
Definition: Task.cpp:64
virtual void update(float)
Definition: Task.cpp:95
virtual void afterAnimate(float)
Definition: Task.h:36
static void onInitialize(void *managed)
Definition: Task.cpp:43
static void onUpdate(void *managed, float elapsed)
Definition: Task.cpp:50
System::Runtime::InteropServices::GCHandle handle
Definition: Task.h:40
static void onStartFixedUpdate(void *manged, float delta)
Definition: Task.cpp:57
Task()
Definition: Task.cpp:11
Definition: Task.h:44
void afterAnimate(float) override
Definition: Task.cpp:127
const char * name() override
Definition: Task.cpp:110
void afterSimulate(float) override
Definition: Task.cpp:132
void * managedTask
Definition: Task.h:57
void update(float elapsed) override
Definition: Task.cpp:117
subTask(void *ptr)
Definition: Task.cpp:105
void startFixedUpdate(float) override
Definition: Task.cpp:122
void initialize() override
Definition: Task.cpp:138
USE_MEMORY_TRACKING
Definition: Task.h:47
void finalize() override
Definition: Task.cpp:143
Definition: Guid.cpp:4