public static List <Vector2> GetWingPositions(Vector2 position, float slide) { List <Vector2> positions = new List <Vector2>(); positions.AddRange(GetWingPositions(position, 9, (float)LerpHelper.QuadraticIn(0, 1, slide), slide)); positions.AddRange(GetWingPositions(position, 9, (float)LerpHelper.QuadraticIn(0, -1, slide), slide)); return(positions); }
public override void Draw(SceneGame scene, DrawPass pass) { if (pass == DrawPass.EffectAdditive) { if (Witnessed) { float wingOpen = WingOpen(); Color windColor = WingColor(); SpriteReference wingSprite = WingSprite(); DrawWing(scene, wingSprite, windColor, 9, (float)LerpHelper.QuadraticIn(0, 1, wingOpen), wingOpen, Microsoft.Xna.Framework.Graphics.SpriteEffects.None); DrawWing(scene, wingSprite, windColor, 9, (float)LerpHelper.QuadraticIn(0, -1, wingOpen), wingOpen, Microsoft.Xna.Framework.Graphics.SpriteEffects.FlipHorizontally); } } else { base.Draw(scene, pass); } }
private float DarkRadius(float a, float b, float slide, float split) { float startSlide = Util.ReverseLerp(slide, 0f, split); float endSlide = Util.ReverseLerp(slide, split, 1f); return(slide < 0.2f ? (float)LerpHelper.QuadraticOut(a, b, startSlide) : (float)LerpHelper.QuadraticIn(b, a, endSlide)); }