コード例 #1
0
        public IsometricMatrix(IsometricMatrixData isoData)
        {
            _isometricMatrix = _isometricReverseMatrix = float4x4.identity;
            _isometricData   = isoData;

            SetIsometricData(isoData);
        }
コード例 #2
0
        /// <inheritdoc />
        protected override void OnCreateManager()
        {
            IsometricMatrixData.CreateSingleton(Resources.Load <IsometricMatrixData>("IsometricMatrixData"));
            RemoveUpdateComponent = false;

            base.OnCreateManager();
            _endSimulationBarrier = World.GetOrCreateSystem <EndSimulationEntityCommandBufferSystem>();
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 public void SetIsometricData(IsometricMatrixData isoData)
 {
     _isometricData = isoData;
     CalculIsometricMatrix();
 }