public TDreamScene(DreamSceneType dreamSceneType)
        : base("")
    {
        FSoundManager.PlayMusic("celesta");

        TParallaxScene parallaxScene = new TParallaxScene(Color.white);
        parallaxScene.AddLayerWithImageName("Atlases/clouds", 1.0f, 0, true);
        parallaxScene.foregroundVelocity = -100f;
        AddChild(parallaxScene);
        parallaxScene.StartUpdating();

        TBorderLayer borderLayer = new TBorderLayer(Futile.screen.width, Futile.screen.height, 5f, new Color(0.2f, 0.2f, 0.2f, 1.0f));
        AddChild(borderLayer);

        this.dreamSceneType = dreamSceneType;

        TMain.labelDisplayLayer.shouldIncreaseHoldDurationBasedOnStringLength = true;
        TMain.labelDisplayLayer.fontColor = Color.black;

        if (this.dreamSceneType == DreamSceneType.DreamSceneOne) {
            TMain.labelDisplayLayer.AddStringsToQueue(new string[] {
                "Suddenly, I fall asleep",
                "In my dream,\nI reminisce about\ncreating the\nperfect last name",
                "Help me piece together\nour last name!"});
        }
        else if (this.dreamSceneType == DreamSceneType.DreamSceneTwo) {
            TMain.labelDisplayLayer.AddStringsToQueue(new string[] {
                "Oh no, all this running\nhas made me fall\nasleep again!",
                "This time, I dream\nabout how much\nI love you",
                "Help me quantify just how\nmuch I love you!"});
        }
        TMain.labelDisplayLayer.defaultHoldDuration = 3.0f;
        TMain.labelDisplayLayer.labelShowType = LabelShowType.SlideFromTop;
        TMain.labelDisplayLayer.labelHideType = LabelHideType.SlideToBottom;
    }
示例#2
0
    public TDreamScene(DreamSceneType dreamSceneType) : base("")
    {
        FSoundManager.PlayMusic("celesta");

        TParallaxScene parallaxScene = new TParallaxScene(Color.white);

        parallaxScene.AddLayerWithImageName("Atlases/clouds", 1.0f, 0, true);
        parallaxScene.foregroundVelocity = -100f;
        AddChild(parallaxScene);
        parallaxScene.StartUpdating();

        TBorderLayer borderLayer = new TBorderLayer(Futile.screen.width, Futile.screen.height, 5f, new Color(0.2f, 0.2f, 0.2f, 1.0f));

        AddChild(borderLayer);

        this.dreamSceneType = dreamSceneType;

        TMain.labelDisplayLayer.shouldIncreaseHoldDurationBasedOnStringLength = true;
        TMain.labelDisplayLayer.fontColor = Color.black;

        if (this.dreamSceneType == DreamSceneType.DreamSceneOne)
        {
            TMain.labelDisplayLayer.AddStringsToQueue(new string[] {
                "Suddenly, I fall asleep",
                "In my dream,\nI reminisce about\ncreating the\nperfect last name",
                "Help me piece together\nour last name!"
            });
        }
        else if (this.dreamSceneType == DreamSceneType.DreamSceneTwo)
        {
            TMain.labelDisplayLayer.AddStringsToQueue(new string[] {
                "Oh no, all this running\nhas made me fall\nasleep again!",
                "This time, I dream\nabout how much\nI love you",
                "Help me quantify just how\nmuch I love you!"
            });
        }
        TMain.labelDisplayLayer.defaultHoldDuration = 3.0f;
        TMain.labelDisplayLayer.labelShowType       = LabelShowType.SlideFromTop;
        TMain.labelDisplayLayer.labelHideType       = LabelHideType.SlideToBottom;
    }
    public TPeopleScene(GoalType goalType)
        : base("")
    {
        FSprite background = SquareMaker.Square(Futile.screen.width, Futile.screen.height);
        background.color = Color.black;
        background.x = Futile.screen.halfWidth;
        background.y = Futile.screen.halfHeight;
        AddChild(background);

        startOverLabel = new FLabel("SoftSugar", "Any key or click\nto start completely over");
        startOverLabel.x = Futile.screen.halfWidth;
        startOverLabel.y = Futile.screen.halfHeight;
        startOverLabel.alpha = 0;
        AddChild(startOverLabel);

        everythingContainer = new FContainer();
        AddChild(everythingContainer);

        parallaxScene = new TParallaxScene(new Color(0.7f, 0.9f, 1.0f, 1.0f));
        parallaxScene.foregroundVelocity = universalVelocity;
        parallaxScene.AddLayerWithImageName("mountains0.png", 0.15f, 0, true);
        parallaxScene.AddLayerWithImageName("mountains1.png", 0.3f, 0, true);
        parallaxScene.AddLayerWithImageName("cloud.psd", 0.2f, Futile.screen.halfHeight + 100f, false);
        parallaxScene.AddLayerWithImageName("ground.psd", 1.0f, 0, true);
        parallaxScene.StartUpdating();
        everythingContainer.AddChild(parallaxScene);

        FSprite fog = SquareMaker.Square(Futile.screen.width, Futile.screen.height);
        fog.x = Futile.screen.halfWidth;
        fog.y = Futile.screen.halfHeight;
        fog.color = Color.black;
        fog.alpha = 0.5f;
        everythingContainer.AddChild(fog);

        this.goalType = goalType;
        tutorialIsDone = TMain.goalOneTutorialIsDone;

        if (this.goalType == GoalType.GoalOne) goalDistance = 20000f;
        else if (this.goalType == GoalType.GoalTwo) goalDistance = 30000f;
        else if (this.goalType == GoalType.GoalThree) goalDistance = 50000f;

        FSoundManager.PlayMusic("jazz");

        SetupHeartTokens();
        SetupUIElements();
        SetupTutorial();
        SetupHeartShower();
        SetupFinalNote();

        if (this.goalType == GoalType.GoalTwo) {
            FLabel label = new FLabel("SoftSugar", "\"I hope Dana's around\nhere somewhere!\"");
            label.x = Futile.screen.halfWidth;
            label.y = Futile.screen.height - 100f;
            everythingContainer.AddChild(label);
            Tween tween = new Tween(label, 0.3f, new TweenConfig()
                .setDelay(3.0f)
                .floatProp("y", Futile.screen.height + 200f)
                .setEaseType(EaseType.SineInOut));
            Go.addTween(tween);
            tween.play();
        }
        else if (this.goalType == GoalType.GoalThree) {
            FLabel label = new FLabel("SoftSugar", "\"Will I ever survive\nwithout her?\"");
            label.x = Futile.screen.halfWidth;
            label.y = Futile.screen.height - 100f;
            everythingContainer.AddChild(label);
            Tween tween = new Tween(label, 0.3f, new TweenConfig()
                .setDelay(3.0f)
                .floatProp("y", Futile.screen.height + 200f)
                .setEaseType(EaseType.SineInOut));
            Go.addTween(tween);
            tween.play();
        }

        whit = new TWalkingCharacter("whitHead.png");
        whit.x = 130f;
        whit.y = 250f;
        everythingContainer.AddChild(whit);
        whit.StartWalking();

        TBorderLayer borderLayer = new TBorderLayer(Futile.screen.width, Futile.screen.height, 5f, new Color(0.2f, 0.2f, 0.2f, 1.0f));
        everythingContainer.AddChild(borderLayer);
    }
    public TPeopleScene(GoalType goalType) : base("")
    {
        FSprite background = SquareMaker.Square(Futile.screen.width, Futile.screen.height);

        background.color = Color.black;
        background.x     = Futile.screen.halfWidth;
        background.y     = Futile.screen.halfHeight;
        AddChild(background);

        startOverLabel       = new FLabel("SoftSugar", "Any key or click\nto start completely over");
        startOverLabel.x     = Futile.screen.halfWidth;
        startOverLabel.y     = Futile.screen.halfHeight;
        startOverLabel.alpha = 0;
        AddChild(startOverLabel);

        everythingContainer = new FContainer();
        AddChild(everythingContainer);

        parallaxScene = new TParallaxScene(new Color(0.7f, 0.9f, 1.0f, 1.0f));
        parallaxScene.foregroundVelocity = universalVelocity;
        parallaxScene.AddLayerWithImageName("mountains0.png", 0.15f, 0, true);
        parallaxScene.AddLayerWithImageName("mountains1.png", 0.3f, 0, true);
        parallaxScene.AddLayerWithImageName("cloud.psd", 0.2f, Futile.screen.halfHeight + 100f, false);
        parallaxScene.AddLayerWithImageName("ground.psd", 1.0f, 0, true);
        parallaxScene.StartUpdating();
        everythingContainer.AddChild(parallaxScene);

        FSprite fog = SquareMaker.Square(Futile.screen.width, Futile.screen.height);

        fog.x     = Futile.screen.halfWidth;
        fog.y     = Futile.screen.halfHeight;
        fog.color = Color.black;
        fog.alpha = 0.5f;
        everythingContainer.AddChild(fog);

        this.goalType  = goalType;
        tutorialIsDone = TMain.goalOneTutorialIsDone;

        if (this.goalType == GoalType.GoalOne)
        {
            goalDistance = 20000f;
        }
        else if (this.goalType == GoalType.GoalTwo)
        {
            goalDistance = 30000f;
        }
        else if (this.goalType == GoalType.GoalThree)
        {
            goalDistance = 50000f;
        }

        FSoundManager.PlayMusic("jazz");

        SetupHeartTokens();
        SetupUIElements();
        SetupTutorial();
        SetupHeartShower();
        SetupFinalNote();

        if (this.goalType == GoalType.GoalTwo)
        {
            FLabel label = new FLabel("SoftSugar", "\"I hope Dana's around\nhere somewhere!\"");
            label.x = Futile.screen.halfWidth;
            label.y = Futile.screen.height - 100f;
            everythingContainer.AddChild(label);
            Tween tween = new Tween(label, 0.3f, new TweenConfig()
                                    .setDelay(3.0f)
                                    .floatProp("y", Futile.screen.height + 200f)
                                    .setEaseType(EaseType.SineInOut));
            Go.addTween(tween);
            tween.play();
        }
        else if (this.goalType == GoalType.GoalThree)
        {
            FLabel label = new FLabel("SoftSugar", "\"Will I ever survive\nwithout her?\"");
            label.x = Futile.screen.halfWidth;
            label.y = Futile.screen.height - 100f;
            everythingContainer.AddChild(label);
            Tween tween = new Tween(label, 0.3f, new TweenConfig()
                                    .setDelay(3.0f)
                                    .floatProp("y", Futile.screen.height + 200f)
                                    .setEaseType(EaseType.SineInOut));
            Go.addTween(tween);
            tween.play();
        }

        whit   = new TWalkingCharacter("whitHead.png");
        whit.x = 130f;
        whit.y = 250f;
        everythingContainer.AddChild(whit);
        whit.StartWalking();

        TBorderLayer borderLayer = new TBorderLayer(Futile.screen.width, Futile.screen.height, 5f, new Color(0.2f, 0.2f, 0.2f, 1.0f));

        everythingContainer.AddChild(borderLayer);
    }