public void Setup(StoryboardObjectGenerator generator, FontGenerator font, int startTime, int endTime, string layerText, float x, float y, bool originCentre, int fontSize, float textFade, int FadeIn, int FadeOut, Color4 textColor, bool showBox, float boxFade, Color4 boxColor, string layerBox, int sampleDelay, string sampleName, DialogBoxes.Pointer pointer, DialogBoxes.Push push) { this.generator = generator; this.font = font; this.x = x; this.y = y; this.fontSize = fontSize; this.layerText = layerText; this.layerBox = layerBox; this.startTime = startTime; this.endTime = endTime; this.originCentre = originCentre; this.textColor = textColor; this.boxColor = boxColor; this.showBox = showBox; this.boxFade = boxFade; this.textFade = textFade; this.sampleDelay = sampleDelay; this.sampleName = sampleName; this.pointer = pointer; this.push = push; this.FadeIn = FadeIn; this.FadeOut = FadeOut; // Generate(sentences, FadeIn, FadeOut); }
public DialogBoxes(StoryboardObjectGenerator generator, string layerName, DialogTiming timing, Position position) { this.generator = generator; this.timing = timing; this.position = position; this.layerName = layerName; }
public DialogManager(StoryboardObjectGenerator generator, FontGenerator font, int startTime, int endTime, string layerText, float x, float y, bool originCentre, int fontSize, float textFade, int FadeIn, int FadeOut, Color4 textColor, bool showBox, float boxFade, Color4 boxColor, string layerBox, int sampleDelay, string sampleName, DialogBoxes.Pointer pointer, DialogBoxes.Push push, string[] sentences) { Setup(generator, font, startTime, endTime, layerText, x, y, originCentre, fontSize, textFade, FadeIn, FadeOut, textColor, showBox, boxFade, boxColor, layerBox, sampleDelay, sampleName, pointer, push); Generate(sentences, FadeIn, FadeOut); }
public DialogText(StoryboardObjectGenerator generator, string layerName, FontGenerator font, OsbSprite sprite, Color4 Color, Position position, DialogTiming timing, float fade, int FadeIn, int FadeOut, int fontSize, bool centre) { //And this pack of lines are just the way we set our local variable with the parameters values of the constructor. this.generator = generator; this.font = font; this.startTime = timing.startTime; this.endTime = timing.endTime; this.position = position; this.fade = fade; this.fontSize = fontSize; this.Color = Color; this.lineWidth = 0f; this.centre = centre; this.layerName = layerName; this.FadeIn = FadeIn; this.FadeOut = FadeOut; }
public HUD(StoryboardObjectGenerator generator, int startTime, int endTime, int loadingTextEndtime, string mission, string songName, string nameTag, int progressBarDelay, string avatar) { //And this pack of lines are just the way we set our local variable with the parameters values of the constructor. this.generator = generator; this.startTime = startTime; this.endTime = endTime; this.loadingTextEndtime = loadingTextEndtime; this.mission = mission; this.songName = songName; this.nameTag = nameTag; this.progressBarDelay = progressBarDelay; this.avatar = avatar; Overlay(); Loading(); Playfield(); Performance(); LoadingText(startTime, endTime, loadingTextEndtime); DialogHUD(startTime, endTime, mission, songName); ProgressBar(nameTag, avatar, startTime + progressBarDelay, endTime); }
public ItemCollect(StoryboardObjectGenerator generator, string avatarPath, float avatarScale, int avatarEndDelay, float startX, float y, string itemsPath, float itemScale, int yMin, int yMax, bool FrontAndBack, int startTime, int endTime, Color4 ThemeColor, int spawnMin, int spawnMax) { this.generator = generator; this.avatarPath = avatarPath; this.avatarScale = avatarScale; this.avatarEndDelay = avatarEndDelay; this.startX = startX; this.y = y; this.itemsPath = itemsPath; this.itemScale = itemScale; this.yMin = yMin; this.yMax = yMax; this.FrontAndBack = FrontAndBack; this.startTime = startTime; this.endTime = endTime; this.ThemeColor = ThemeColor; this.spawnMin = spawnMin; this.spawnMax = spawnMax; Generate(avatarPath, avatarScale, avatarEndDelay, startX, y, itemsPath, itemScale, yMin, yMax, FrontAndBack, startTime, endTime, ThemeColor, spawnMin, spawnMax); }
public OsbSprite GenerateBoxes(StoryboardObjectGenerator generator, string layerName, int soundDelay, string soundEffect, Color4 Color, DialogTiming timing, float pointerScale, float Fade, Position position, Pointer pointer, Push push, bool centre, float lineWidth, float lineHeight, OsbSprite spriteBox, bool startTriggerGroup = false, string triggerType = "", int startTrigger = 0, int endTrigger = 0, int triggerGroup = 0) { var d = 300; var fadeTime = 500; var PushValue = 30; var biggerBox = 10; var boxPos = centre ? new Vector2(position.position.X - lineWidth * 0.5f - (biggerBox / 2) - 3, position.position.Y - (biggerBox / 2) - 4) : new Vector2(position.position.X - (biggerBox / 2) - 3, position.position.Y - (biggerBox / 2) - 4); var layer = generator.GetLayer(layerName); // var inputBox = layer.CreateSprite("sb/dialog/box/b.png", OsbOrigin.TopLeft, boxPos); var inputBox = layer.CreateAnimation("sb/dialog/box/b.png", 30, 60, OsbLoopType.LoopForever, OsbOrigin.TopLeft, boxPos); var bitmapInputBox = generator.GetMapsetBitmap("sb/pixel.png"); var bitmapInputBox2 = generator.GetMapsetBitmap("sb/pixel.png"); var bitmapInputBoxWidth = ((lineWidth / bitmapInputBox.Width) + biggerBox); var bitmapInputBoxHeight = (lineHeight / bitmapInputBox.Height) + biggerBox; var widthInputBox = bitmapInputBoxWidth / 900; var heightInputBox = bitmapInputBoxHeight / 400; var bWidth = widthInputBox * 900; var bHeight = heightInputBox * 900; // var bitmapPointer = generator.GetMapsetBitmap("sb/dialog/pointers/pointer.png"); // var bitmapPointerCorner = generator.GetMapsetBitmap("sb/dialog/pointers/pointerCorner.png"); // generator.Log($"width: {widthInputBox} heigt: {heightInputBox}"); if (startTriggerGroup) { inputBox.StartTriggerGroup(triggerType, startTrigger, endTrigger, triggerGroup); } // sfx - message-1 var message1 = layer.CreateSample(soundEffect, timing.startTime - d + soundDelay, 40); // // start style if (pointer == Pointer.None) { inputBox.Color(timing.startTime - d, Color); inputBox.ScaleVec(timing.startTime - d, widthInputBox, heightInputBox); inputBox.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); inputBox.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); if (push == Push.None) { if (push == Push.Up) { inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y + PushValue, boxPos.Y); inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y - PushValue); } } if (push == Push.Down) { inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y - PushValue, boxPos.Y); inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y + PushValue); } if (push == Push.Left) { inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X + PushValue, boxPos.X); inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X - PushValue); } if (push == Push.Right) { inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X - PushValue, boxPos.X); inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X + PushValue); } } // end style else { inputBox.Color(timing.startTime - d, Color); inputBox.ScaleVec(timing.startTime - d, widthInputBox, heightInputBox); inputBox.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); inputBox.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); if (push == Push.None) { if (push == Push.Up) { inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y + PushValue, boxPos.Y); inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y - PushValue); } } if (push == Push.Down) { inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y - PushValue, boxPos.Y); inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y + PushValue); } if (push == Push.Left) { inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X + PushValue, boxPos.X); inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X - PushValue); } if (push == Push.Right) { inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X - PushValue, boxPos.X); inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X + PushValue); } } // // start style // if (pointer == Pointer.Up) // { // inputBox.Color(timing.startTime - d, Color); // inputBox.ScaleVec(timing.startTime - d, widthInputBox, heightInputBox); // inputBox.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // inputBox.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // var pointerPos = new Vector2(boxPos.X + (lineWidth / 2), boxPos.Y); // var point = layer.CreateSprite("sb/dialog/pointers/pointer.png", OsbOrigin.BottomCentre, pointerPos); // if (startTriggerGroup) // { // point.StartTriggerGroup(triggerType, startTrigger, endTrigger, triggerGroup); // } // point.Color(timing.startTime - d, Color); // point.Scale(timing.startTime, pointerScale); // point.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // point.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // if (push == Push.None) // { // point.MoveX(timing.startTime - d, pointerPos.X); // point.MoveY(timing.endTime + d, pointerPos.Y); // } // if (push == Push.Up) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y + PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y - PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y + PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y - PushValue); // } // if (push == Push.Down) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y - PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y + PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y - PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y + PushValue); // } // if (push == Push.Left) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X + PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X - PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X + PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X - PushValue); // } // if (push == Push.Right) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X - PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X + PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X - PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X + PushValue); // } // if (startTriggerGroup) // { // point.EndGroup(); // } // spriteBox = point; // } // // end style // // start style // if (pointer == Pointer.Down) // { // inputBox.Color(timing.startTime - d, Color); // inputBox.ScaleVec(timing.startTime - d, widthInputBox, heightInputBox); // inputBox.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // inputBox.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // var pointerPos = new Vector2(boxPos.X + (lineWidth / 2), boxPos.Y + heightInputBox); // var point = layer.CreateSprite("sb/dialog/pointers/pointer.png", OsbOrigin.BottomCentre, pointerPos); // if (startTriggerGroup) // { // point.StartTriggerGroup(triggerType, startTrigger, endTrigger, triggerGroup); // } // point.Rotate(timing.startTime, MathHelper.DegreesToRadians(180)); // point.Scale(timing.startTime, pointerScale); // point.Color(timing.startTime - d, Color); // point.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // point.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // if (push == Push.None) // { // point.MoveX(timing.startTime - d, pointerPos.X); // point.MoveY(timing.endTime + d, pointerPos.Y); // } // if (push == Push.Up) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y + PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y - PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y + PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y - PushValue); // } // if (push == Push.Down) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y - PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y + PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y - PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y + PushValue); // } // if (push == Push.Left) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X + PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X - PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X + PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X - PushValue); // } // if (push == Push.Right) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X - PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X + PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X - PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X + PushValue); // } // if (startTriggerGroup) // { // point.EndGroup(); // } // spriteBox = point; // } // // end style // // start style // if (pointer == Pointer.CentreLeft) // { // inputBox.Color(timing.startTime - d, Color); // inputBox.ScaleVec(timing.startTime - d, widthInputBox, heightInputBox); // inputBox.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // inputBox.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // var pointerPos = new Vector2(boxPos.X, boxPos.Y + (heightInputBox / 2)); // var point = layer.CreateSprite("sb/dialog/pointers/pointer.png", OsbOrigin.BottomCentre, pointerPos); // if (startTriggerGroup) // { // point.StartTriggerGroup(triggerType, startTrigger, endTrigger, triggerGroup); // } // point.Rotate(timing.startTime, MathHelper.DegreesToRadians(-90)); // point.Scale(timing.startTime, pointerScale); // point.Color(timing.startTime - d, Color); // point.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // point.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // if (push == Push.None) // { // point.MoveX(timing.startTime - d, pointerPos.X); // point.MoveY(timing.endTime + d, pointerPos.Y); // } // if (push == Push.Up) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y + PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y - PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y + PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y - PushValue); // } // if (push == Push.Down) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y - PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y + PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y - PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y + PushValue); // } // if (push == Push.Left) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X + PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X - PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X + PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X - PushValue); // } // if (push == Push.Right) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X - PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X + PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X - PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X + PushValue); // } // if (startTriggerGroup) // { // point.EndGroup(); // } // spriteBox = point; // } // // end style // // start style // if (pointer == Pointer.CentreRight) // { // inputBox.Color(timing.startTime - d, Color); // inputBox.ScaleVec(timing.startTime - d, widthInputBox, heightInputBox); // inputBox.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // inputBox.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // var pointerPos = new Vector2(boxPos.X + widthInputBox, boxPos.Y + (heightInputBox / 2)); // var point = layer.CreateSprite("sb/dialog/pointers/pointer.png", OsbOrigin.BottomCentre, pointerPos); // if (startTriggerGroup) // { // point.StartTriggerGroup(triggerType, startTrigger, endTrigger, triggerGroup); // } // point.Rotate(timing.startTime, MathHelper.DegreesToRadians(90)); // point.Scale(timing.startTime, pointerScale); // point.Color(timing.startTime - d, Color); // point.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // point.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // if (push == Push.None) // { // point.MoveX(timing.startTime - d, pointerPos.X); // point.MoveY(timing.endTime + d, pointerPos.Y); // } // if (push == Push.Up) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y + PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y - PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y + PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y - PushValue); // } // if (push == Push.Down) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y - PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y + PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y - PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y + PushValue); // } // if (push == Push.Left) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X + PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X - PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X + PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X - PushValue); // } // if (push == Push.Right) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X - PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X + PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X - PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X + PushValue); // } // if (startTriggerGroup) // { // point.EndGroup(); // } // spriteBox = point; // } // // end style // // start style // if (pointer == Pointer.TopLeft) // { // inputBox.Color(timing.startTime - d, Color); // inputBox.ScaleVec(timing.startTime - d, widthInputBox, heightInputBox); // inputBox.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // inputBox.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // var pointerPos = new Vector2(boxPos.X + (bitmapPointerCorner.Height / 4) + 0.5f, boxPos.Y + (bitmapPointerCorner.Height / 4) + 0.5f); // var point = layer.CreateSprite("sb/dialog/pointers/pointerCorner.png", OsbOrigin.BottomCentre, pointerPos); // if (startTriggerGroup) // { // point.StartTriggerGroup(triggerType, startTrigger, endTrigger, triggerGroup); // } // point.Rotate(timing.startTime, MathHelper.DegreesToRadians(-45)); // point.Scale(timing.startTime, pointerScale); // point.Color(timing.startTime - d, Color); // point.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // point.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // if (push == Push.None) // { // point.MoveX(timing.startTime - d, pointerPos.X); // point.MoveY(timing.endTime + d, pointerPos.Y); // } // if (push == Push.Up) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y + PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y - PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y + PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y - PushValue); // } // if (push == Push.Down) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y - PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y + PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y - PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y + PushValue); // } // if (push == Push.Left) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X + PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X - PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X + PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X - PushValue); // } // if (push == Push.Right) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X - PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X + PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X - PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X + PushValue); // } // if (startTriggerGroup) // { // point.EndGroup(); // } // spriteBox = point; // } // // end style // // start style // if (pointer == Pointer.TopRight) // { // inputBox.Color(timing.startTime - d, Color); // inputBox.ScaleVec(timing.startTime - d, widthInputBox, heightInputBox); // inputBox.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // inputBox.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // var pointerPos = new Vector2(boxPos.X + widthInputBox - (bitmapPointerCorner.Height / 4) - 0.5f, boxPos.Y + (bitmapPointerCorner.Height / 4) + 0.5f); // var point = layer.CreateSprite("sb/dialog/pointers/pointerCorner.png", OsbOrigin.BottomCentre, pointerPos); // if (startTriggerGroup) // { // point.StartTriggerGroup(triggerType, startTrigger, endTrigger, triggerGroup); // } // point.Rotate(timing.startTime, MathHelper.DegreesToRadians(45)); // point.Scale(timing.startTime, pointerScale); // point.Color(timing.startTime - d, Color); // point.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // point.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // if (push == Push.None) // { // point.MoveX(timing.startTime - d, pointerPos.X); // point.MoveY(timing.endTime + d, pointerPos.Y); // } // if (push == Push.Up) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y + PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y - PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y + PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y - PushValue); // } // if (push == Push.Down) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y - PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y + PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y - PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y + PushValue); // } // if (push == Push.Left) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X + PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X - PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X + PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X - PushValue); // } // if (push == Push.Right) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X - PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X + PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X - PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X + PushValue); // } // if (startTriggerGroup) // { // point.EndGroup(); // } // spriteBox = point; // } // // end style // // start style // if (pointer == Pointer.BottomLeft) // { // inputBox.Color(timing.startTime - d, Color); // inputBox.ScaleVec(timing.startTime - d, widthInputBox, heightInputBox); // inputBox.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // inputBox.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // var pointerPos = new Vector2(boxPos.X + (bitmapPointerCorner.Height / 4) + 0.5f, boxPos.Y + heightInputBox - (bitmapPointerCorner.Height / 4) - 0.5f); // var point = layer.CreateSprite("sb/dialog/pointers/pointerCorner.png", OsbOrigin.BottomCentre, pointerPos); // if (startTriggerGroup) // { // point.StartTriggerGroup(triggerType, startTrigger, endTrigger, triggerGroup); // } // point.Rotate(timing.startTime, MathHelper.DegreesToRadians(-135)); // point.Scale(timing.startTime, pointerScale); // point.Color(timing.startTime - d, Color); // point.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // point.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // if (push == Push.None) // { // point.MoveX(timing.startTime - d, pointerPos.X); // point.MoveY(timing.endTime + d, pointerPos.Y); // } // if (push == Push.Up) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y + PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y - PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y + PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y - PushValue); // } // if (push == Push.Down) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y - PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y + PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y - PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y + PushValue); // } // if (push == Push.Left) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X + PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X - PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X + PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X - PushValue); // } // if (push == Push.Right) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X - PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X + PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X - PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X + PushValue); // } // if (startTriggerGroup) // { // point.EndGroup(); // } // spriteBox = point; // } // // end style // // start style // if (pointer == Pointer.BottomRight) // { // inputBox.Color(timing.startTime - d, Color); // inputBox.ScaleVec(timing.startTime - d, widthInputBox, heightInputBox); // inputBox.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // inputBox.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // var pointerPos = new Vector2(boxPos.X + widthInputBox - (bitmapPointerCorner.Height / 4) - 0.5f, boxPos.Y + heightInputBox - (bitmapPointerCorner.Height / 4) - 0.5f); // var point = layer.CreateSprite("sb/dialog/pointers/pointerCorner.png", OsbOrigin.BottomCentre, pointerPos); // if (startTriggerGroup) // { // point.StartTriggerGroup(triggerType, startTrigger, endTrigger, triggerGroup); // } // point.Rotate(timing.startTime, MathHelper.DegreesToRadians(135)); // point.Scale(timing.startTime, pointerScale); // point.Color(timing.startTime - d, Color); // point.Fade(timing.startTime - d, timing.startTime - d + 200, 0, Fade); // point.Fade(timing.endTime + d - fadeTime, timing.endTime + d, Fade, 0); // if (push == Push.None) // { // point.MoveX(timing.startTime - d, pointerPos.X); // point.MoveY(timing.endTime + d, pointerPos.Y); // } // if (push == Push.Up) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y + PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y - PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y + PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y - PushValue); // } // if (push == Push.Down) // { // inputBox.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.Y - PushValue, boxPos.Y); // inputBox.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.Y, boxPos.Y + PushValue); // point.MoveY(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.Y - PushValue, pointerPos.Y); // point.MoveY(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.Y, pointerPos.Y + PushValue); // } // if (push == Push.Left) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X + PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X - PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X + PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X - PushValue); // } // if (push == Push.Right) // { // inputBox.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, boxPos.X - PushValue, boxPos.X); // inputBox.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), boxPos.X, boxPos.X + PushValue); // point.MoveX(OsbEasing.OutBack, timing.startTime - d, timing.startTime - d + 400, pointerPos.X - PushValue, pointerPos.X); // point.MoveX(OsbEasing.OutSine, timing.endTime + (d * 2) - 400, timing.endTime + (d * 2), pointerPos.X, pointerPos.X + PushValue); // } // if (startTriggerGroup) // { // point.EndGroup(); // } // spriteBox = point; // } // // end style if (startTriggerGroup) { inputBox.EndGroup(); } spriteBox = inputBox; return(spriteBox); }
public SpriteResource(StoryboardObjectGenerator effect) { this.effect = effect; }
public static Vector3 randomDirection(Vector3 direction, float angularVariance, Random rng, StoryboardObjectGenerator logger = null) { // random point on a cylindrical slice double z = 1 - (1 - Math.Cos(MathHelper.DegreesToRadians(angularVariance))) * rng.NextDouble(); double angle = 2 * Math.PI * rng.NextDouble(); double x = Math.Cos(angle); double y = Math.Sin(angle); // projected onto a sphere double r = Math.Sqrt(1 - z * z); x *= r; y *= r; if (logger != null) { logger.Log(direction); } if (logger != null) { logger.Log(direction.getRotation()); } if (logger != null) { logger.Log(round(outwards(1).rotate3D(direction.getRotation(), true), 2)); } return(new Vector3((float)x, (float)y, (float)z).rotate3D(direction.getRotation(), true)); }