-
Notifications
You must be signed in to change notification settings - Fork 2
/
BossEnemyModel.h
117 lines (90 loc) · 2.13 KB
/
BossEnemyModel.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
//=====================================
//
//ボスエネミーモデルヘッダ[BossEnemyModel.h]
//Author:GP12B332 21 立花雄太
//
//=====================================
#ifndef _BOSSENEMYMODEL_H_
#define _BOSSENEMYMODEL_H_
#include "main.h"
#include "EnemyModel.h"
#include "IStateMachine.h"
#include "RebarOb.h"
#include "BossColliderController.h"
#include <unordered_map>
#include <list>
#include <memory>
/**************************************
マクロ定義
***************************************/
class BossEnemyActor;
class EnemyBulletController;
class BossUImanager;
/**************************************
クラス定義
***************************************/
class BossEnemyModel
{
public:
enum State
{
Init,
RebarAttack,
HomingAttack,
Damageable,
LargeDamage,
Idle,
Defeat
};
BossEnemyModel(const Transform& player, BossUImanager& uiManager);
~BossEnemyModel();
int Update();
void Draw();
void ChangeState(State next);
void SetRebar(int num);
void ThrowRebar();
void StartBulletCharge();
void NotifyBullet();
void FireBullet();
void SetCollider();
void OnDamage();
void Explode();
void ChargeExplode(Transform*& charge, Transform*& core);
bool IsDesteoyed();
void OnHitBomber();
D3DXVECTOR3 GetPosition();
void GetRebarList(std::list<std::shared_ptr<RebarObstacle>>& out);
void ReceivePlayerPosition(int index);
bool IsAlive();
private:
BossEnemyActor* actor;
std::unordered_map < State, IStateMachine<BossEnemyModel>*> fsm;
IStateMachine<BossEnemyModel>* state;
State currentState, prevState;
std::list<std::shared_ptr<RebarObstacle>> rebarList;
EnemyBulletController *bulletController;
std::vector<LineTrailModel> bulletReserve;
BossColliderController *colliderController;
const Transform& player;
int playerPositionIndex;
BossUImanager& uiManager;
int cntAttack;
int level;
int cntLoop;
bool isDestroyed;
bool flgBomberHit;
void MakeOneStrokeEdge(int edgeNum, std::vector<int>& edgeList);
class BossInit;
class BossRebarAttack;
class BossHomingAttack;
class BossIdle;
class BossLargeDamage;
class BossDefeat;
class BossIdle;
class BossDamageable;
enum Const
{
LevelMax = 3
};
};
#endif