public override void Reset()
 {
     Parent       = null;
     _flags       = TransformFlags.All;
     _localMatrix = Matrix2D.Identity;
     _worldMatrix = Matrix2D.Identity;
     _position    = Vector2.Zero;
     _rotation    = 0;
     _scale       = Vector2.One;
 }
        private void OnParentChanged(TransformComponent2D oldParent, TransformComponent2D newParent)
        {
            var parent = oldParent;

            while (parent != null)
            {
                parent.TransformBecameDirty -= ParentOnTransformBecameDirty;
                parent = parent.Parent;
            }

            parent = newParent;
            while (parent != null)
            {
                parent.TransformBecameDirty += ParentOnTransformBecameDirty;
                parent = parent.Parent;
            }
        }