Initial commit

This commit is contained in:
HussienX72u
2026-07-21 08:56:10 +03:00
commit 4017028111
9410 changed files with 2150500 additions and 0 deletions
@@ -0,0 +1,35 @@
using UnityEngine;
/// <summary>
/// Placement handler for brand-new blocks dragged from the menu.
/// </summary>
public class NewBlockPlacementHandler : IPlacementHandler
{
private readonly CommandHandler _commandHandler;
public NewBlockPlacementHandler(CommandHandler commandHandler)
{
_commandHandler = commandHandler;
Debug.Log("initialize the NewBlockPlacement");
}
public void Commit(BlockEditContext ctx)
{
if (ctx.Block == null) return;
_commandHandler.createBlock(
ctx.Block.getBlockData()?.blockName,
ctx.GhostTransform.position,
ctx.GhostTransform.rotation);
}
public void Cancel(BlockEditContext ctx)
{
// nothing for now
}
public void Debugln()
{
Debug.Log("Hi I'm New");
}
}