-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayerSystem.h
150 lines (128 loc) · 6.55 KB
/
PlayerSystem.h
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#pragma once
#include <System.h>
#include "VisPredComponents.h"
#include "EventSubscriber.h"
class PlayerSystem :
public System, public IUpdatable,public IPhysicable,public IStartable,public IFixedUpdatable,public IRenderable,public ISoundable,public EventSubscriber
{
public:
PlayerSystem(std::shared_ptr<SceneManager> sceneManager);
~PlayerSystem()=default;
// IUpdatable을(를) 통해 상속됨
void Update(float deltaTime) override;
// IFixedUpdatable을(를) 통해 상속됨
void FixedUpdate(float deltaTime) override;
bool ChangeArm(PlayerComponent& playercomp, bool IsVPmode);
// IPhysicable을(를) 통해 상속됨
void PhysicsUpdate(float deltaTime) override {};
void PhysicsLateUpdate(float deltaTime) override {};
// IRenderable을(를) 통해 상속됨
void BeginRenderUpdate(float deltaTime) override {};
void RenderUpdate(float deltaTime) override {};
void LateRenderUpdate(float deltaTime) override {};
void EditorRenderUpdate(float deltaTime) override {};
// ISoundable을(를) 통해 상속됨
void SoundUpdate(float deltaTime) override;
void VPMode_Cooltime(PlayerComponent& playercomp, float deltatime);
void Transformation_Time(PlayerComponent& playercomp, float deltatime);
void NonDamage_Time(PlayerComponent& playercomp, float deltatime);
void Gun_Cooltime(PlayerComponent& playercomp, float deltatime);
void ShootNormalBullet(PlayerComponent& playercomp, GunComponent& guncomp, TransformComponent& firetrans);
void SearchingInterectives(PlayerComponent& playercomp);
void SearchInterective(PlayerComponent& playercomp);
//void Active_VPMode(PlayerComponent& playercomp);
void CameraShake(PlayerComponent& playercomp,float deltatime);
void PlayerMeleeAttack(PlayerComponent& playercomp);
void Melee_Default(PlayerComponent& playercomp);
void Melee_VPMode(PlayerComponent& playercomp);
#pragma region Physics Setting
void UpdateCharDataToController(PlayerComponent& playercomp);
void UpdateControllerSize(PlayerComponent& playercomp);
void OnCrouchModeController(std::any playercomp);
void OnSlideModeController(std::any playercomp);
void OnDefalutModeController(std::any playercomp);
void CrouchModeController(PlayerComponent& playercomp);
void SlideModeController(PlayerComponent& playercomp);
void DefalutModeController(PlayerComponent& playercomp);
void DownCamera(PlayerComponent& playercomp,float deltatime);
void UpCamera(PlayerComponent& playercomp, float deltatime);
void CarmeraPosChange(PlayerComponent& playercomp,float deltatime);
#pragma endregion
#pragma region FSM Action
void Action_FSM(PlayerComponent& playercomp, float deltaTime);
void Action_Idle(PlayerComponent& playercomp);
void Action_Walk(PlayerComponent& playercomp);
void Action_Run(PlayerComponent& playercomp);
void Action_Crouch(PlayerComponent& playercomp);
void Action_Slide(PlayerComponent& playercomp,float deltatime);
void Action_Jump(PlayerComponent& playercomp);
void Action_Die(PlayerComponent& playercomp, float deltatime);
void Action_Destroy(PlayerComponent& playercomp);
void Action_Transformation(PlayerComponent& playercomp,float deltatime);
#pragma endregion
#pragma region FSM Sound
void Sound_FSM(PlayerComponent& playercomp, float deltaTime);
void Sound_Idle(PlayerComponent& playercomp) {};
void Sound_Walk(PlayerComponent& playercomp);
void Sound_Run(PlayerComponent& playercomp);
void Sound_Crouch(PlayerComponent& playercomp) {};
void Sound_Slide(PlayerComponent& playercomp) {};
void Sound_Transformation(PlayerComponent& playercomp) {};
void Sound_Jump(PlayerComponent& playercomp) {};
void Sound_Die(PlayerComponent& playercomp) {};
void Sound_Destroy(PlayerComponent& playercomp) {};
#pragma endregion
#pragma region Animation Change
void ChangeAni_Index(uint32_t entityID, VisPred::Game::PlayerAni index, float Speed, float transition, bool loop, bool Immidiate = false);
void ChangeAni_Index(uint32_t entityID, VisPred::Game::VPAni index, float Speed, float transition, bool loop, bool Immidiate = false);
#pragma endregion
#pragma region Active_Logic
void Active_Interect(PlayerComponent& playercomp);
void Active_Walk(const TransformComponent& transformcomp, PlayerComponent& playercomp, ControllerComponent& controllercomp);
void Active_Rotation(PlayerComponent& playercomp, TransformComponent& transformcomp);
void Active_Jump(const TransformComponent& transformcomp, ControllerComponent& controllercomp);
void Active_Slide(PlayerComponent& playercomp, float deltatime);
void Active_Attack(PlayerComponent& playercomp);
#pragma endregion
#pragma region Animation
void GodMode(PlayerComponent& playercomp);
void PlayerAnimation(PlayerComponent& playercomp);
void ReturnToIdle(AnimationComponent& anicomp);
void ReturnToVPIdle(PlayerComponent& player, AnimationComponent& anicomp);
void AnimationFinished(PlayerComponent& playercomp, AnimationComponent& anicomp);
void VPAnimationFinished(PlayerComponent& playercomp, AnimationComponent& anicomp);
#pragma endregion
#pragma region Interection Logic
/// <summary>
/// VPMODEChange
/// </summary>
/// <param name="playercomp"></param>
void OnDrop_Gun(std::any playercomp);
void Drop_Gun(PlayerComponent& playercomp);
#pragma endregion
void OnDamaged(std::any entityid_Damage);
#pragma region Gun Logic
void Gun_RecoilingToMiddle(PlayerComponent& playercomp, float deltatime);
bool Gun_Shoot(PlayerComponent& playercomp,GunComponent& guncomp);
bool Gun_Throw(PlayerComponent& playercomp, GunComponent& guncomp);
void Gun_RecoilSetting(PlayerComponent& playercomp, GunComponent& guncomp);
#pragma region Shoot Logic
bool Shoot_Common(PlayerComponent& playercomp, GunComponent& guncomp, VisPred::Game::PlayerAni idleAnimation, VisPred::Game::PlayerAni attackAnimation);
bool Shoot_Pistol(PlayerComponent& playercomp, GunComponent& guncomp, TransformComponent& TransformComp);
bool Shoot_ShotGun(PlayerComponent& playercomp, GunComponent& guncomp, TransformComponent& TransformComp);
bool Shoot_Rifle(PlayerComponent& playercomp, GunComponent& guncomp,TransformComponent& TransformComp);
#pragma endregion
#pragma region Shoot Logic
bool Throw_Pistol(PlayerComponent& playercomp, GunComponent& guncomp);
bool Throw_ShotGun(PlayerComponent& playercomp, GunComponent& guncomp);
bool Throw_Rifle(PlayerComponent& playercomp, GunComponent& guncomp);
bool Throw_Setting(PlayerComponent& playercomp);
#pragma endregion
// IStartable을(를) 통해 상속됨
void Initialize() override;
void Start(uint32_t gameObjectId) override;
void Finish(uint32_t gameObjectId) override {};
void Finalize() override;
double RecoilPercent(double curtime, double time, double percent);
bool RecoilReturn(double curtime, double time, double percent);
};