public IsometricMatrix(IsometricMatrixData isoData) { _isometricMatrix = _isometricReverseMatrix = float4x4.identity; _isometricData = isoData; SetIsometricData(isoData); }
/// <inheritdoc /> protected override void OnCreateManager() { IsometricMatrixData.CreateSingleton(Resources.Load <IsometricMatrixData>("IsometricMatrixData")); RemoveUpdateComponent = false; base.OnCreateManager(); _endSimulationBarrier = World.GetOrCreateSystem <EndSimulationEntityCommandBufferSystem>(); }
public static IsometricMatrix CreateIsometricMatrix(IsometricMatrixData isoData) { var isoMatrix = new IsometricMatrix(new IsometricMatrix.IsometricMatrixData { OffsetWorldToIsometric = isoData._offsetWorldToIsometric, TileSize = isoData._tileSize, TileRatio = isoData._tileRatio, TileAngle = isoData._tileAngle, TileHeight = isoData._tileHeight }); return(isoMatrix); }
public static void CreateSingleton(IsometricMatrixData isoData) { if (World.Active == null) { World.Active = new World("Editor World"); } var dstManager = World.Active.EntityManager; var singletonGroup = dstManager.CreateEntityQuery(typeof(IsometricMatrix)); var matrix = CreateIsometricMatrix(isoData); dstManager.AddComponentData(dstManager.CreateEntity(), matrix); singletonGroup.SetSingleton(matrix); }
public void SetIsometricData(IsometricMatrixData isoData) { _isometricData = isoData; CalculIsometricMatrix(); }