Esempio n. 1
0
            public override void Update(float dt)
            {
                base.Update(dt);

                if (T < 1f)
                {
                    return;
                }

                spot = spot.Lerp(Self.Target.Center, dt * 0.5f);

                for (var i = 0; i < 8; i++)
                {
                    var laser = lasers[i];

                    if (laser.Done)
                    {
                        foreach (var l in lasers)
                        {
                            l.Done = true;
                        }

                        Become <FightState>();
                        return;
                    }

                    laser.Position = spot + laserOffsets[i];
                }
            }
Esempio n. 2
0
 public static Vector2 Lerp(Vector2 v1, Vector2 v2, float amount)
 {
     return(new Vector2(Vector.Lerp(v1, v2, amount)));
 }