#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" #include "Effect.h" class Crawler : public olc::PixelGameEngine { Camera2D camera; Player player; Renderable GFX_Pl_Sheet,GFX_Slime_Sheet,GFX_Circle, GFX_Effect_GroundSlam_Back,GFX_Effect_GroundSlam_Front, GFX_Heart; std::vectorforegroundEffects,backgroundEffects; public: Crawler(); public: const vi2d WORLD_SIZE={120,8}; TileTransformedView view; bool OnUserCreate() override; bool OnUserUpdate(float fElapsedTime) override; void InitializeAnimations(); void HandleUserInput(float fElapsedTime); void UpdateCamera(float fElapsedTime); void UpdateEffects(float fElapsedTime); void UpdateBullets(float fElapsedTime); void RenderWorld(float fElapsedTime); void RenderHud(); 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(); Player&GetPlayer(); };