ItemEntity.h 699 B

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