Files
gpd-924-en/CPlusPlus/Classes/Monster.h
T
david 3b35b973c9 add smart pointers
add polymorphism
add destructor & copy constructor
add pointer-pointer
2025-09-22 18:22:03 +02:00

25 lines
621 B
C++

#pragma once
#include "Entity.h"
#include "ICompareable.h"
#include "Vector3.h"
#include "Weapon.h"
class Monster : public Entity, public ICompareable
{
public:
// default constructor, copy constructor & destructor if you need one you'll need all of them
// internal pointers often requires default & copy constructor & a destructor at the same time
Monster();
Monster(const Monster& other); // copy constructor
virtual ~Monster();
std::string toString() override { return "Monster"; }
virtual void Move(Vector3 move) = 0;
int Compare(ICompareable* pOther) override;
private:
Weapon* _pWeapon = nullptr;
};