2026-03-01 12:16:08 +08:00
|
|
|
#pragma once
|
|
|
|
|
#include "Vec3.h"
|
|
|
|
|
|
|
|
|
|
class HitResult
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
enum Type
|
|
|
|
|
{
|
|
|
|
|
TILE, ENTITY
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Type type;
|
|
|
|
|
int x, y, z, f;
|
|
|
|
|
Vec3 *pos;
|
2026-03-02 17:37:16 +07:00
|
|
|
shared_ptr<Entity> entity;
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
HitResult(int x, int y, int z, int f, Vec3 *pos);
|
|
|
|
|
|
2026-03-02 17:37:16 +07:00
|
|
|
HitResult(shared_ptr<Entity> entity);
|
2026-03-01 12:16:08 +08:00
|
|
|
|
2026-03-02 17:37:16 +07:00
|
|
|
double distanceTo(shared_ptr<Entity> e);
|
2026-03-01 12:16:08 +08:00
|
|
|
};
|