Example #1
0
        //==================================================================

        internal void MoveTo(Vector3 pos)
        {
            Vector3 oldPos = m_pos;

            m_pos = pos;

            Vector3 dir = m_pos - oldPos;

            m_angles.z = (float)(Math.Atan2(dir.y, dir.x) * 180 / Math.PI) - 90;

            if (m_next != null)
            {
                m_next.MoveTo(oldPos);
            }
        }
Example #2
0
 internal void SetNext(SnakeNode node)
 {
     m_next = node;
     m_next.MoveTo(m_pos);
 }