Ejemplo n.º 1
0
 public void OnFrameEnd(Object o, EventArgs e)
 {
     // return;
     CLI.ZobObjectWrapper z = m_zobObjectManagerWrapper.GetRootObject();
     if (z != null && z.IsValid())
     {
         CLI.ManagedVector3 v = z.GetRotation();
         v.y += 0.8f;
         z.SetRotation(v);
     }
 }
Ejemplo n.º 2
0
        private void UpdateValues()
        {
            if (m_zobObjectWrapper != null && m_zobObjectWrapper.IsValid())
            {
                CLI.ManagedVector3 p = m_zobObjectWrapper.GetTransform();
                CLI.ManagedVector3 r = m_zobObjectWrapper.GetRotation();
                CLI.ManagedVector3 s = m_zobObjectWrapper.GetScale();

                float px = p.x;
                float py = p.y;
                float pz = p.z;
                float rx = r.x;
                float ry = r.y;
                float rz = r.z;
                float sx = s.x;
                float sy = s.y;
                float sz = s.z;
                float f;
                if (float.TryParse(zobPosX.Text, out f))
                {
                    p.x = f;
                }
                if (float.TryParse(zobPosY.Text, out f))
                {
                    p.y = f;
                }
                if (float.TryParse(zobPosZ.Text, out f))
                {
                    p.z = f;
                }
                if (float.TryParse(zobRotX.Text, out f))
                {
                    r.x = f;
                }
                if (float.TryParse(zobRotY.Text, out f))
                {
                    r.y = f;
                }
                if (float.TryParse(zobRotZ.Text, out f))
                {
                    r.z = f;
                }
                if (float.TryParse(zobScaleX.Text, out f))
                {
                    s.x = f;
                }
                if (float.TryParse(zobScaleY.Text, out f))
                {
                    s.y = f;
                }
                if (float.TryParse(zobScaleZ.Text, out f))
                {
                    s.z = f;
                }

                m_zobObjectWrapper.SetTransform(p);
                m_zobObjectWrapper.SetRotation(r);
                m_zobObjectWrapper.SetScale(s);
                SetValues();
            }
        }