private IEnumerable <bool> GetTaskSequence() { if (this.Pictures.Count == 0) // ? 画像が追加されていない。 { throw new DDError(); } int outOfCameraFrame = 0; for (int frame = 0; ; frame++) { double drawX = this.X - DDGround.ICamera.X; double drawY = this.Y - DDGround.ICamera.Y; DDDraw.SetAlpha(this.A); DDDraw.DrawBegin(this.Pictures[(frame / this.FramePerPicture) % this.Pictures.Count], drawX, drawY); DDDraw.DrawRotate(this.R); DDDraw.DrawZoom(this.Z); DDDraw.DrawEnd(); this.X += this.XAdd; this.Y += this.YAdd; this.R += this.RAdd; this.Z += this.ZAdd; this.A += this.AAdd; this.XAdd += this.XAdd2; this.YAdd += this.YAdd2; this.RAdd += this.RAdd2; this.ZAdd += this.ZAdd2; this.AAdd += this.AAdd2; if (DDUtils.IsOutOfScreen(new D2Point(drawX, drawY))) //if (DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y))) { outOfCameraFrame++; if (20 < outOfCameraFrame) { break; } } else { outOfCameraFrame = 0; } if (this.A < 0.0) { break; } yield return(true); } }
// // copied the source file by https://github.com/stackprobe/Factory/blob/master/SubTools/CopyLib.c // public static void DrawCurtain(double whiteLevel = -1.0) { if (whiteLevel == 0.0) { return; } whiteLevel = DoubleTools.ToRange(whiteLevel, -1.0, 1.0); if (whiteLevel < 0.0) { DDDraw.SetAlpha(-whiteLevel); DDDraw.SetBright(0.0, 0.0, 0.0); } else { DDDraw.SetAlpha(whiteLevel); } DDDraw.DrawRect(DDGround.GeneralResource.WhiteBox, 0, 0, DDConsts.Screen_W, DDConsts.Screen_H); DDDraw.Reset(); }