Files
AdventuresInLestoria/Crawler/Crawler.h
T

47 lines
1.2 KiB
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
{
Camera2D camera;
Player player;
2023-06-15 00:11:39 -05:00
Renderable GFX_Pl_Sheet,GFX_Slime_Sheet,GFX_Circle,
2023-06-16 01:59:46 -05:00
GFX_Effect_GroundSlam_Back,GFX_Effect_GroundSlam_Front,
GFX_Heart;
2023-06-15 00:11:39 -05:00
std::vector<Effect>foregroundEffects,backgroundEffects;
public:
Crawler();
public:
2023-06-16 01:51:26 -05:00
const vi2d WORLD_SIZE={120,8};
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);
2023-06-16 01:41:38 -05:00
void UpdateBullets(float fElapsedTime);
2023-06-12 00:37:55 -05:00
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);
vf2d GetWorldMousePos();
bool LeftHeld();
bool RightHeld();
bool UpHeld();
bool DownHeld();
bool LeftReleased();
bool RightReleased();
bool UpReleased();
bool DownReleased();
2023-06-15 23:44:34 -05:00
Player&GetPlayer();
};