forked from YutaTachibana0310/SankouGoudou2019Summer
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBossInit.cpp
45 lines (38 loc) · 1.15 KB
/
BossInit.cpp
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
//=====================================
//
//ボス初期状態処理[BossInit.cpp]
//Author:GP12A332 21 立花雄太
//
//=====================================
#include "BossInit.h"
#include "BossEnemyActor.h"
#include "Framework\Vector3.h"
/**************************************
マクロ定義
***************************************/
#define BOSSINIT_MOVE_DURATION (180)
#define BOSSINIT_INITPOSITION (D3DXVECTOR3(0.0f, 2000.0f, 1500.0f))
#define BOSSINIT_MOVE_POSITION (D3DXVECTOR3(0.0f, -200.0f, 1500.0f))
/**************************************
入場処理
***************************************/
void BossEnemyModel::BossInit::OnStart(BossEnemyModel *entity)
{
entity->actor->transform.pos = BOSSINIT_INITPOSITION;
entity->actor->Move(BOSSINIT_MOVE_POSITION, BOSSINIT_MOVE_DURATION);
entity->actor->ChangeAnimation(BossEnemyActor::AnimID::Flying);
cntFrame = 0;
}
/**************************************
更新処理
***************************************/
int BossEnemyModel::BossInit::OnUpdate(BossEnemyModel *entity)
{
cntFrame++;
int result = BossEnemyModel::Init;
if (cntFrame == BOSSINIT_MOVE_DURATION)
{
result = BossEnemyModel::State::Idle;
}
return result;
}