Exemplo n.º 1
0
        public override void Update()
        {
            base.Update();
            if (InteractionTimeCounter < InteractionTime)
            {
                return;
            }

            for (float i = 0; i < Parameter.ProjectileMovementTotalTimeElapsed; i += Parameter.ProjectileMovementTimeElapsedPerInteraction)
            {
                trace.Update(FlipbookList[0].Position, traceOffset, FlipbookList[0].Rotation, Parameter.ProjectileMovementTimeElapsedPerInteraction, angleOffset);

                dProj.FlipbookList[0].Position = trace.Position;

                if (dProj.CheckOutOfBounds(trace.Position))
                {
                    return;
                }

                if (dProj.UpdateCollider(trace.Position))
                {
                    Explode();
                    return;
                }
            }
        }
Exemplo n.º 2
0
        public override void Update()
        {
            base.Update();
            if (InteractionTimeCounter < InteractionTime)
            {
                return;
            }

            for (float i = 0; i < Parameter.ProjectileMovementTotalTimeElapsed; i += Parameter.ProjectileMovementTimeElapsedPerInteraction)
            {
                angleDecreasingOffsetTimer -= Parameter.ProjectileMovementTimeElapsedPerInteraction;
                if (angleDecreasingOffsetTimer < 0)
                {
                    angleFactor = Math.Max(0, angleFactor - Parameter.ProjectileTurtleS2AngleOffsetFactor * Parameter.ProjectileMovementTimeElapsedPerInteraction);
                }

                trace.Update(FlipbookList[0].Position, new Vector2(0, 20), FlipbookList[0].Rotation, Parameter.ProjectileMovementTimeElapsedPerInteraction, angleOffset, Parameter.ProjectileTurtleS2RotationFactor, angleFactor);

                dProj.FlipbookList[0].Position = trace.Position;

                if (dProj.CheckOutOfBounds(trace.Position))
                {
                    return;
                }

                if (dProj.UpdateCollider(trace.Position))
                {
                    Explode();
                    return;
                }
            }
        }