|
|
@@ -9,14 +9,17 @@ using Unity.Mathematics; |
|
|
|
namespace GamecraftModdingAPI.Blocks |
|
|
|
{ |
|
|
|
/// <summary> |
|
|
|
/// Common block movement operations |
|
|
|
/// Common block movement operations. |
|
|
|
/// The functionality of this class only works in build mode. |
|
|
|
/// </summary> |
|
|
|
public static class Movement |
|
|
|
{ |
|
|
|
private static MovementEngine movementEngine = new MovementEngine(); |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Move a single block by a specific (x,y,z) amount |
|
|
|
/// Move a single block by a specific (x,y,z) amount (offset). |
|
|
|
/// The moved block will remain connected to the blocks it was touching before it was moved. |
|
|
|
/// The block's placement grid and collision box are also moved. |
|
|
|
/// </summary> |
|
|
|
/// <param name="id">The block's id</param> |
|
|
|
/// <param name="vector">The movement amount (x,y,z)</param> |
|
|
@@ -32,7 +35,10 @@ namespace GamecraftModdingAPI.Blocks |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Move all connected blocks by a specific (x,y,z) amount |
|
|
|
/// Move all connected blocks by a specific (x,y,z) amount (offset). |
|
|
|
/// The moved blocks will remain connected to the block they're touching. |
|
|
|
/// All of the block's placement grids and collision boxes are also moved. |
|
|
|
/// This is equivalent to calling MoveBlock() for every connected block. |
|
|
|
/// </summary> |
|
|
|
/// <param name="id">The starting block's id</param> |
|
|
|
/// <param name="vector">The movement amount (x,y,z)</param> |
|
|
|