コード例 #1
0
        public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
        {
            var data = new InputComponent {
                Speed = speed
            };

            dstManager.AddComponentData(entity, data);
        }
コード例 #2
0
            public void Execute(ArchetypeChunk chunk, int chunkIndex, int firstEntityIndex)
            {
                var chunkInputs = chunk.GetNativeArray(InputComponent);

                for (var i = 0; i < chunk.Count; i++)
                {
                    float speed = chunkInputs[i].Speed;
                    chunkInputs[i] = new InputComponent
                    {
                        Speed      = speed,
                        Horizontal = Horizontal,
                        Vertical   = Vertical
                    };
                }
            }