ItemEntity.h 725 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include "Entity.h"
  3. #include "EntityType.h"
  4. class ItemEntityType;
  5. class ItemEntity : public Entity
  6. {
  7. private:
  8. ItemSlot* slot;
  9. ItemEntity(Framework::Vec3<float> location, int dimensionId, int entityId);
  10. public:
  11. void prepareTick(const Dimension* zDimension) override;
  12. void tick(const Dimension* zDimension) override;
  13. void onFall(float collisionSpeed) override;
  14. bool hasDefaultModel() const override;
  15. ModelInfo* zSpecialModel() const override;
  16. friend ItemEntityType;
  17. };
  18. class ItemEntityType : public EntityType
  19. {
  20. public:
  21. ItemEntityType();
  22. virtual Entity* createEntity(Framework::Vec3<float> position,
  23. int dimensionId,
  24. int entityId) const override;
  25. };