Esempio n. 1
0
        public bool UpdatePosition(Entity entity, DWorldPositionData information)
        {
            var hasEntity = EntityManager.HasComponent <DWorldPositionData>(entity);

            if (!hasEntity)
            {
                return(false);
            }

            EntityManager.SetComponentData(entity, information);

            return(true);
        }
Esempio n. 2
0
        public bool UpdateTransform(Entity entity, DWorldPositionData informationPos, DWorldRotationData informationRot)
        {
            if (EntityManager.HasComponent <DWorldPositionData>(entity))
            {
                EntityManager.SetComponentData(entity, informationPos);
            }

            if (EntityManager.HasComponent <DWorldRotationData>(entity))
            {
                EntityManager.SetComponentData(entity, informationRot);
            }

            return(true);
        }
Esempio n. 3
0
 public DWorldTransformData(DWorldPositionData positionComponent, DWorldRotationData rotationComponent)
 {
     Position = positionComponent.Value;
     Rotation = rotationComponent.Value;
 }