-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
401b561
commit 9b2b32f
Showing
9 changed files
with
102 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,6 +84,7 @@ class BossEnemyModel | |
class BossIdle; | ||
class BossLargeDamage; | ||
class BossDefeat; | ||
class BossIdle; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//===================================== | ||
// | ||
//ボスアイドル処理[BossIdle.cpp] | ||
//Author:GP12A332 21 立花雄太 | ||
// | ||
//===================================== | ||
#include "BossIdle.h" | ||
#include "BossEnemyActor.h" | ||
|
||
/************************************** | ||
マクロ定義 | ||
***************************************/ | ||
|
||
/************************************** | ||
入場処理 | ||
***************************************/ | ||
void BossEnemyModel::BossIdle::OnStart(BossEnemyModel * entity) | ||
{ | ||
entity->actor->ChangeAnimation(BossEnemyActor::AnimID::Idle); | ||
cntFrame = 0; | ||
} | ||
|
||
/************************************** | ||
更新処理 | ||
***************************************/ | ||
int BossEnemyModel::BossIdle::OnUpdate(BossEnemyModel * entity) | ||
{ | ||
cntFrame++; | ||
|
||
int next = BossEnemyModel::State::Idle; | ||
|
||
if (cntFrame == 120) | ||
{ | ||
if (entity->prevState == BossEnemyModel::State::HomingAttack) | ||
next = BossEnemyModel::State::RebarAttack; | ||
|
||
else if (entity->prevState == BossEnemyModel::State::RebarAttack) | ||
next = BossEnemyModel::State::HomingAttack; | ||
|
||
else | ||
next = RandomRange(0, 100) < 50 ? BossEnemyModel::State::RebarAttack : BossEnemyModel::State::HomingAttack; | ||
} | ||
|
||
return next; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//===================================== | ||
// | ||
//ボスアイドルヘッダ[BossIdle.h] | ||
//Author:GP12B332 21 立花雄太 | ||
// | ||
//===================================== | ||
#ifndef _BOSSIDLE_H_ | ||
#define _BOSSIDLE_H_ | ||
|
||
#include "main.h" | ||
#include "IStateMachine.h" | ||
#include "BossEnemyModel.h" | ||
|
||
/************************************** | ||
前方宣言 | ||
***************************************/ | ||
|
||
/************************************** | ||
マクロ・列挙子定義 | ||
***************************************/ | ||
|
||
/************************************** | ||
クラス定義 | ||
***************************************/ | ||
class BossEnemyModel::BossIdle : public IStateMachine<BossEnemyModel> | ||
{ | ||
public: | ||
void OnStart(BossEnemyModel* entity); | ||
int OnUpdate(BossEnemyModel* entity); | ||
|
||
private: | ||
int cntFrame; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters