ItemEntity.h 720 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include "Entity.h"
  3. #include "EntityType.h"
  4. class ItemEntityType;
  5. class ItemEntity : public Entity
  6. {
  7. ItemSlot* slot;
  8. public:
  9. ItemEntity( Framework::Vec3<float> location, int dimensionId, int entityId );
  10. void tick( const Dimension* zDimension ) override;
  11. void api( Framework::StreamReader* zRequest, NetworkResponse* zResponse ) override;
  12. void onFall( float collisionSpeed ) override;
  13. friend ItemEntityType;
  14. };
  15. class ItemEntityType : public EntityType
  16. {
  17. REGISTRABLE( ItemEntityType )
  18. public:
  19. ItemEntityType();
  20. virtual Entity* createEntity( Framework::Vec3<float> position, int dimensionId, int entityId ) const override;
  21. };
  22. REGISTER( ItemEntityType, EntityType )