Blink.Classes.SpearClass.throwUpdate C# (CSharp) Method

throwUpdate() private method

private throwUpdate ( ) : void
return void
        private void throwUpdate()
        {
            

            if (spear.X < spear.Width)
            {
                spear.X += (int)SCREENSIZE.X;
            }


            if (spear.Y < spear.Width)
            {
                spear.Y += (int)SCREENSIZE.Y;
            }
            
            velocity.Y += GRAVITY / 10f;

            if(thrownBy != null) { 
            spear.X += (int)(velocity.X * thrownBy.getMulti());
            spear.Y += (int)(velocity.Y * thrownBy.getMulti());
            }
            else
            {
                spear.X += (int)(velocity.X);
                spear.Y += (int)(velocity.Y);
            }

            Vector2 dirVect = new Vector2(velocity.X, -velocity.Y);
            if (!(dirVect.X == 0) && !(dirVect.Y == 0))
            {
                dirVect.Normalize();
                orientation = VectorMath.rotationFromVector(dirVect)+ (float)(Math.PI / 2);
            }

            /*if (Math.Abs(velocity.X) >= Math.Abs(velocity.Y))
            {
                if (velocity.X > 0)
                    spearOrientation = 4;
                else
                    spearOrientation = 0;
            }
            else
            {
                if (velocity.Y > 0)
                    spearOrientation = 6;
                else
                    spearOrientation = 2;
            }*/

            /*if (spearOwner != null)
            {
                Rectangle inter = Rectangle.Intersect(spearOwner.getPlayerRect(), new Rectangle((int)spear.X, (int)spear.Y, spear.Width, spear.Height));
                if (inter.Width == 0 && inter.Height == 0)
                {
                    //throwing = false;
                    isInUse = false;
                    attachedToPlayer = false;
                    spearOwner.hasSpear = false;
                    spearOwner.setSpear(null);
                    setOwner(null);
                }
            }*/
        }