forked from NTUT-FUCK-PTSD/Fuck-PTSD
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NTUT-FUCK-PTSD#136 from HeavenManySugar/enemyPlus
Refactor enemy classes and add Monkey enemy class
- Loading branch information
Showing
32 changed files
with
694 additions
and
217 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#ifndef MONKEY_H | ||
#define MONKEY_H | ||
|
||
#include "Dungeon/Enemy.h" | ||
|
||
namespace Dungeon { | ||
namespace Enemies { | ||
class Monkey final : public Dungeon::Enemy { | ||
public: | ||
Monkey(const s_Enemy& u_Enemy, const std::shared_ptr<MapData> mapData); | ||
|
||
void Move() override; | ||
|
||
void AttackPlayer() override; | ||
|
||
void UpdateProperties(const glm::vec2& direction); | ||
|
||
void Update() override; | ||
|
||
private: | ||
void OnPlayer(); | ||
const glm::vec2 m_FrameSize = {25, 24}; | ||
std::vector<std::size_t> m_BackFrames; | ||
std::vector<std::size_t> m_ShadowBackFrames; | ||
std::size_t m_HealthGrapple; | ||
|
||
bool m_Back = false; | ||
}; | ||
} // namespace Enemies | ||
} // namespace Dungeon | ||
|
||
#endif // MONKEY_H |
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
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ enum class EventType { | |
AttackPlayer, | ||
PlayerMove, | ||
EnemyMove, | ||
EnemyRemove, | ||
}; | ||
|
||
#endif // EVENT_TYPE_H |
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
Oops, something went wrong.