35 lines
965 B
C
Raw Normal View History

#pragma once
#include "olcPixelGameEngine.h"
#include "Animation.h"
#include "olcUTIL_Animate2D.h"
#include "Monster.h"
#include "olcPGEX_TransformedView.h"
#include "Player.h"
#include "olcUTIL_Camera2D.h"
2023-06-15 00:11:39 -05:00
#include "Effect.h"
class Crawler : public olc::PixelGameEngine
{
const vi2d WORLD_SIZE={64,8};
Camera2D camera;
Player player;
2023-06-15 00:11:39 -05:00
Renderable GFX_Pl_Sheet,GFX_Slime_Sheet,GFX_Circle,
GFX_Effect_GroundSlam_Back,GFX_Effect_GroundSlam_Front;
std::vector<Effect>foregroundEffects,backgroundEffects;
public:
Crawler();
public:
2023-06-15 00:11:39 -05:00
TileTransformedView view;
bool OnUserCreate() override;
bool OnUserUpdate(float fElapsedTime) override;
void InitializeAnimations();
void HandleUserInput(float fElapsedTime);
void UpdateCamera(float fElapsedTime);
2023-06-15 00:11:39 -05:00
void UpdateEffects(float fElapsedTime);
void RenderWorld(float fElapsedTime);
void RenderHud();
2023-06-15 00:11:39 -05:00
void AddEffect(Effect foreground,Effect background);
void HurtEnemies(vf2d pos,float radius,int damage);
};