-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColiderComponent.h
More file actions
53 lines (39 loc) · 1.13 KB
/
ColiderComponent.h
File metadata and controls
53 lines (39 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
#include"IComponent.h"
#include"GltfModelComponent.h"
#include"TransformComponent.h"
#include"GpuBufferFactory.h"
#include"DescriptorSetFactory.h"
#include"Colider.h"
class ColiderComponent : public IComponent
{
private:
std::shared_ptr<TransformComponent> transformComponent;
std::shared_ptr<Colider> colider;
std::shared_ptr<GpuBufferFactory> bufferFactory;
std::shared_ptr<GpuDescriptorSetLayoutFactory> layoutFactory;
std::shared_ptr<DescriptorSetFactory> descriptorSetFactory;
public:
ColiderComponent(std::shared_ptr<GpuBufferFactory> buffer
, std::shared_ptr<GpuDescriptorSetLayoutFactory> layout
, std::shared_ptr<DescriptorSetFactory> desc)
{
bufferFactory = buffer;
layoutFactory = layout;
descriptorSetFactory = desc;
}
//すべてのコンポーネントをアタッチしたときに実行
void initilize(std::shared_ptr<TransformComponent> transform
,std::shared_ptr<GltfModelComponent> gltfModel);
std::shared_ptr<Colider> getColider()
{
return colider;
}
//初期フレームに実行
void OnStart() override;
//更新フェーズで実行
void OnUpdate() override;
//更新フェーズ後に実行
void OnLateUpdate() override;
};
};