28 lines
No EOL
840 B
C#
28 lines
No EOL
840 B
C#
using Svelto.ECS;
|
|
|
|
using GamecraftModdingAPI.Utility;
|
|
|
|
namespace GamecraftModdingAPI.Blocks
|
|
{
|
|
public class Removal
|
|
{
|
|
private static RemovalEngine _removalEngine = new RemovalEngine();
|
|
|
|
/// <summary>
|
|
/// Removes the block with the given ID. Returns false if the block doesn't exist or the game isn't in build mode.
|
|
/// </summary>
|
|
/// <param name="targetBlock">The block to remove</param>
|
|
/// <returns>Whether the block was successfully removed</returns>
|
|
public static bool RemoveBlock(EGID targetBlock)
|
|
{
|
|
if (GameState.IsBuildMode())
|
|
return _removalEngine.RemoveBlock(targetBlock);
|
|
return false;
|
|
}
|
|
|
|
public static void Init()
|
|
{
|
|
GameEngineManager.AddGameEngine(_removalEngine);
|
|
}
|
|
}
|
|
} |