You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
597 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Otter;
namespace OtterPongGame {
class BallTrail : Entity {
Image imgBall = Image.CreateCircle(7, Color.Cyan);
public BallTrail(float x, float y) : base(x, y) {
SetGraphic(imgBall);
imgBall.CenterOrigin();
LifeSpan = 60;
Layer = 100;
}
public override void Update() {
base.Update();
imgBall.Alpha = Util.ScaleClamp(Timer, 0, LifeSpan, 1, 0);
}
}
}