Skip to content
Snippets Groups Projects
Select Git revision
  • fc218c97111a0c28b89c4a7d2e9dc7722beb3733
  • master default protected
  • Patrik
  • own-vm
  • Mike
5 results

index.html

Blame
  • Forked from Tóth Miklós Tibor / Linux presentation 2020
    Source project has a limited visibility.
    LivingEntity.h 673 B
    #pragma once
    #include "Entity.h"
    namespace entities {
    	class LivingEntity :
    		public Entity
    	{
    	private:
    		int health;
    		char direction;
    		char anim_phase;
    		float timeUntilNextPhase;
    		const static float phaseLength;
    	protected:
    		olc::vf2d getHitBoxSize() const override;
    		olc::vf2d speed;
    		virtual olc::vf2d collisionOffset(GameClient& client);
    		
    	public:
    		LivingEntity(olc::vf2d pos, int health = 512);
    		bool damage(int damage, Entity& attacker) override;
    		char getDirection();
    		char getAnimPhase() const;
    
    
    		void tick(GameClient& client, float deltaT, std::shared_ptr<Entity>& shared_this) override; //TODO
    
    		LivingEntity* getAsLivingEntity() override;
    	};
    }