public ClampEmitter(ClampEmitter other) { Anim1 = new AnimData(other.Anim1); Anim2 = new AnimData(other.Anim2); Offset = other.Offset; LocHeight = other.LocHeight; HalfOffset = other.HalfOffset; HalfHeight = other.HalfHeight; LingerStart = other.LingerStart; MoveTime = other.MoveTime; LingerEnd = other.LingerEnd; }
public MoveToEmitter(MoveToEmitter other) { Anim = new AnimData(other.Anim); OffsetStart = other.OffsetStart; HeightStart = other.HeightStart; OffsetEnd = other.OffsetEnd; HeightEnd = other.HeightEnd; LingerStart = other.LingerStart; MoveTime = other.MoveTime; LingerEnd = other.LingerEnd; ResultAnim = other.ResultAnim.CloneIEmittable(); ResultLayer = other.ResultLayer; }
public HelixAnim(AnimData anim, int totalTime, Loc origin, int radius, int degreesStart, int cycleSpeed, int locHeight, int heightSpeed) : base(anim, totalTime) { Origin = origin; Radius = radius; DegreesStart = degreesStart; CycleSpeed = cycleSpeed; StartHeight = locHeight; HeightSpeed = heightSpeed; locHeight = StartHeight; this.mapLoc = Origin + GetCycle(Radius, Radius / 2, DegreesStart); Direction = GetCycle(Radius, Radius / 2, DegreesStart + 90 * (CycleSpeed < 0 ? -1 : 1)).ApproximateDir8(); }
public MoveToAnim(AnimData anim, int moveTime, Loc startLoc, Loc newEndPos, int startHeight, int endHeight, int lingerStart, int lingerEnd, Dir8 dir) : base(anim, moveTime + lingerStart + lingerEnd) { MovingTime = moveTime; StartLoc = startLoc; EndLoc = newEndPos; StartHeight = startHeight; EndHeight = endHeight; Direction = dir; LingerStart = lingerStart; LingerEnd = lingerEnd; locHeight = StartHeight; mapLoc = StartLoc; }
public override void Update(BaseScene scene, FrameTick elapsedTime) { CurrentBurstTime += elapsedTime; while (CurrentBurstTime >= Math.Max(1, BurstTime)) { CurrentBurstTime -= Math.Max(1, BurstTime); for (int ii = 0; ii < ParticlesPerBurst; ii++) { if (Anims.Count > 0) { List <int> openDirs = getOpenDirs(); int openIndex = openDirs[MathUtils.Rand.Next(openDirs.Count)]; Coverages[openIndex] = true; double angle = (openIndex + MathUtils.Rand.NextDouble()) * Math.PI / 4; int dist = StartDistance + MathUtils.Rand.Next(StartVariance + 1); Loc startDelta = new Loc((int)Math.Round(Math.Cos(angle) * dist), (int)Math.Round(Math.Sin(angle) * dist)); double endAngle = MathUtils.Rand.NextDouble() * Math.PI * 2; int endDist = MathUtils.Rand.Next(EndDistance + 1); Loc endDelta = new Loc((int)Math.Round(Math.Cos(endAngle) * endDist), (int)Math.Round(Math.Sin(endAngle) * endDist)); Loc particleSpeed = ((UseDest ? Destination : Origin) + endDelta - (Origin + startDelta)) * GraphicsManager.MAX_FPS / TravelTime; Loc startLoc = Origin + startDelta; { AnimData animData = Anims[MathUtils.Rand.Next(Anims.Count)]; AnimData scaledAnim = new AnimData(animData); DirSheet fxSheet = GraphicsManager.GetAttackSheet(animData.AnimIndex); scaledAnim.FrameTime = (int)Math.Round((float)TravelTime / scaledAnim.GetTotalFrames(fxSheet.TotalFrames) / Math.Max(1, Cycles)); scaledAnim.FrameTime = Math.Max(1, scaledAnim.FrameTime); ParticleAnim anim = new ParticleAnim(scaledAnim, 0, TravelTime); anim.SetupEmitted(startLoc, particleSpeed, Loc.Zero, 0, 0, 0, particleSpeed.ApproximateDir8()); scene.Anims[(int)Layer].Add(anim); } } } CurrentBursts++; if (CurrentBursts >= Math.Max(1, Bursts)) { break; } } }
public MoveToAnim(AnimData anim, IEmittable emittable, DrawLayer layer, int moveTime, Loc startLoc, Loc newEndPos, int startHeight, int endHeight, int lingerStart, int lingerEnd, Dir8 dir) : base(anim, moveTime + lingerStart + lingerEnd) { MovingTime = moveTime; StartLoc = startLoc; EndLoc = newEndPos; StartHeight = startHeight; EndHeight = endHeight; Direction = dir; LingerStart = lingerStart; LingerEnd = lingerEnd; locHeight = StartHeight; mapLoc = StartLoc; ResultAnim = emittable; Layer = layer; }
public SingleEmitter(AnimData anim, int cycles) { Anim = new StaticAnim(anim, cycles, 0); Layer = DrawLayer.Normal; }
public SingleEmitter(AnimData anim) { Anim = new StaticAnim(anim); Layer = DrawLayer.Normal; }
public LoopingAnim(AnimData anim, int totalTime, int cycles) { Anim = anim; TotalTime = totalTime; Cycles = cycles; }
public LoopingAnim(AnimData anim, int totalTime) { Anim = anim; TotalTime = totalTime; }
public MoveToEmitter() { Anim = new AnimData(); ResultAnim = new EmptyFiniteEmitter(); ResultLayer = DrawLayer.Normal; }
public StaticAnim(AnimData anim, int cycles, int totalTime) : base(anim, totalTime, cycles) { }
public StaticAnim(AnimData anim) : this(anim, 1, 0) { }
public WrappedRainAnim(AnimData anim, int totalTime) : base(anim, 0, totalTime) { ResultAnim = new AnimData(); }
public ParticleAnim(AnimData anim, int cycles, int totalTime) : base(anim, cycles, totalTime) { }
public ClampEmitter() { Anim1 = new AnimData(); Anim2 = new AnimData(); }
public BetweenEmitter(AnimData animBack, AnimData animFront) { AnimBack = new StaticAnim(animBack); AnimFront = new StaticAnim(animFront); }
public Emote(AnimData anim, int height, int cycles) { Anim = anim; locHeight = height; TotalTime = anim.FrameTime * anim.GetTotalFrames(GraphicsManager.GetAttackSheet(anim.AnimIndex).TotalFrames) * cycles; }
public MoveToEmitter() { Anim = new AnimData(); }
public SwingSwitchEmitter() { Anim = new AnimData(); Layer = DrawLayer.Normal; }
public ParticleAnim(AnimData anim, int cycles) : base(anim, cycles) { }
public AnimData(AnimData other) : base(other) { }
public StaticAnim(AnimData anim, int cycles) : this(anim, cycles, 0) { }
public ParticleAnim(AnimData anim) : base(anim) { }
public WrappedRainAnim(AnimData anim, AnimData resultAnim, DrawLayer layer, int totalTime) : base(anim, 0, totalTime) { Layer = layer; ResultAnim = resultAnim; }
public RepeatEmitter(AnimData anim) { Anim = new StaticAnim(anim); Layer = DrawLayer.Normal; }
public SwingSwitchEmitter(AnimData anim) { Anim = anim; Layer = DrawLayer.Normal; }
public LoopingAnim() { Anim = new AnimData(); }
public ScreenRainEmitter(AnimData anim) : this() { Anim = anim; }
public LoopingAnim(AnimData anim) { Anim = anim; }