GrandLarceny.Rope.update C# (CSharp) Method

update() public method

public update ( GameTime a_gameTime ) : void
a_gameTime Microsoft.Xna.Framework.GameTime
return void
        public override void update(GameTime a_gameTime)
        {
            base.update(a_gameTime);/*
            m_rotate = m_rotate % ((float)Math.PI * 2);
            if (m_moveToStart && m_rotate > (float)Math.PI / 2 -0.05f && m_rotate < (float)Math.PI / 2 + 0.05f)
            {
                m_rotate = (float)Math.PI / 2;
            }
            else if (m_moveToStart && ((m_rotate > (float)Math.PI/2 + Math.PI) || ((m_rotate > Math.PI / 2 - Math.PI) && (m_rotate < Math.PI / 2))))
            {
                m_rotate += 0.04f;
            }
            else if (m_moveToStart)
            {
                m_rotate -= 0.04f;
            }*/
            m_collisionShape.setPosition(m_line.getStartPoint());
            ((CollisionLine)m_collisionShape).setEndPosition(m_line.getEndPoint().getGlobalCartesian());
            if (m_moveToStart)
            {
                m_swingSpeed += (float)(Math.Cos(m_rotate) * a_gameTime.ElapsedGameTime.Milliseconds / 1000f);
                m_swingSpeed = m_swingSpeed * 0.97f;
                m_rotate += m_swingSpeed;
            }
            if (!(this is Hookshot))
                m_line.setEndPoint(m_line.getStartPoint().getGlobalCartesian() + new Vector2(m_lenght * (float)Math.Cos(m_rotate), m_lenght * (float)Math.Sin(m_rotate)), Vector2.Zero);
        }