Ejemplo n.º 1
0
        public void MoveBone_SingleSelection()
        {
            Vector3 deltaPosition;

            m_SkeletonView.DoMoveBone(out deltaPosition).Returns(x =>
            {
                x[0] = Vector3.up * 3f;
                return(true);
            });

            Selection.activeGameObject = m_SpriteSkin.boneTransforms[0].gameObject;
            m_BoneGizmoController.OnSelectionChanged();
            m_BoneGizmoController.OnGUI();

            Assert.That(m_SpriteSkin.boneTransforms[0].position, Is.EqualTo(new Vector3(-1.219143f, 3.253849f, 0f)).Using(vec3Compare));
        }
Ejemplo n.º 2
0
        private void HandleMoveBone()
        {
            Vector3 deltaPosition;

            if (view.DoMoveBone(out deltaPosition))
            {
                SetBonePosition(deltaPosition);
            }
        }