feat: add block model with IBlock flyweight and registry
This commit is contained in:
21
World/IBlock.cs
Normal file
21
World/IBlock.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace VoxelEngine.World;
|
||||
|
||||
public interface IBlock
|
||||
{
|
||||
ushort Id { get; }
|
||||
string Name { get; }
|
||||
|
||||
// Drives face culling: a face is emitted only if its neighbor is not opaque.
|
||||
bool IsOpaque { get; }
|
||||
|
||||
// Reserved for future collision (not used in the baseline).
|
||||
bool IsSolid { get; }
|
||||
|
||||
// Atlas tile index for the given face.
|
||||
int GetTextureIndex(BlockFace face);
|
||||
|
||||
// Interaction hooks — capability present now, system built post-baseline.
|
||||
void OnInteract() { }
|
||||
void OnPlaced() { }
|
||||
void OnBroken() { }
|
||||
}
|
||||
Reference in New Issue
Block a user