예제 #1
0
 void EndMathMode()
 {
     _baseLabel.RemoveFromContainer();
     _deltaLabel.RemoveFromContainer();
     _signIcon.RemoveFromContainer();
     _equalsIcon.RemoveFromContainer();
 }
예제 #2
0
                public override void RemoveSprites()
                {
                    base.RemoveSprites();

                    icon.RemoveSprites();
                    name.RemoveFromContainer();
                }
예제 #3
0
 public void RemoveFromContainer()
 {
     _back.RemoveFromContainer();
     _front.RemoveFromContainer();
     _rtIndicator.RemoveFromContainer();
     _key?.RemoveFromContainer();
     _keySprite?.RemoveFromContainer();
 }
예제 #4
0
 public void RemoveDebugLabels()
 {
     labelPlayer.RemoveFromContainer();
     labelExposure.RemoveFromContainer();
     labelAmbient.RemoveFromContainer();
     labelBlizzard.RemoveFromContainer();
     labelCooldown.RemoveFromContainer();
 }
예제 #5
0
 public override void HandleRemovedFromStage()
 {
     labelShadow.RemoveFromContainer();
     clockBackground.RemoveFromContainer();
     Futile.instance.SignalUpdate -= Update;
     timeLabel.RemoveFromContainer();
     base.HandleRemovedFromStage();
     label.RemoveFromContainer();
 }
예제 #6
0
 public override void Destroy()
 {
     base.Destroy();
     yesButton.Destroy();
     noButton.Destroy();
     if (cancelButton != null)
     {
         cancelButton.Destroy();
     }
     border.Destroy();
     text.RemoveFromContainer();
     VoezEditor.confirmBoxOpen = false;
 }
예제 #7
0
 public override void Destroy()
 {
     base.Destroy();
     moveButton.Destroy();
     scaleButton.Destroy();
     colorButton.Destroy();
     keyframeEditor.Destroy();
     border.Destroy();
     startLabel.RemoveFromContainer();
     endLabel.RemoveFromContainer();
     valueLabel.RemoveFromContainer();
     VoezEditor.Editor.trackEditor = null;
     VoezEditor.Editor.ui.trackAdder.previewScale = -1f;
     VoezEditor.Editor.ui.trackAdder.previewX     = -1f;
 }
예제 #8
0
 public override void Destroy()
 {
     base.Destroy();
     clickNote.Destroy();
     slideNote.Destroy();
     swipeNote.Destroy();
     leftDir.Destroy();
     rightDir.Destroy();
     border.Destroy();
     holdLabel.RemoveFromContainer();
     timeLabel.RemoveFromContainer();
     dirLabel.RemoveFromContainer();
     typeLabel.RemoveFromContainer();
     VoezEditor.Editor.noteEditor = null;
 }
예제 #9
0
    void UpdateShouldRemove()
    {
        if (_shouldRemove)
        {
            AddChild(_skullSprite);
            _skullSprite.SetPosition(_scoreLabel.GetPosition());
            _scoreLabel.RemoveFromContainer();

            FSoundManager.PlaySound("UI/ResetToZero");
        }
        else
        {
            AddChild(_scoreLabel);
            _skullSprite.RemoveFromContainer();
        }
    }
예제 #10
0
 public void HandlePlayerCollision(Player p)
 {
     if (p.isColliding(this))
     {
         //FSoundManager.PlaySound("powerup");
         isBeingPickedUp = true;
         FSoundManager.TweenVolume(.3f);
         p.isVisible = false;
         Go.killAllTweensWithTarget(p);
         p.State = Player.PlayerState.IDLE;
         p.xVel = 0;
         p.yVel = 0;
         Go.killAllTweensWithTarget(this);
         FSprite playerPickup = new FSprite("player_13");
         C.getCameraInstance().AddChild(playerPickup);
         Vector2 playerRelativePosition = p.GetPosition() + Futile.stage.GetPosition() - Vector2.up * 16f;
         playerPickup.SetPosition(playerRelativePosition);
         this.SetPosition(this.GetPosition() + Futile.stage.GetPosition() - Vector2.up * 16f);
         world.removeObject(this);
         C.getCameraInstance().AddChild(this);
         world.forceWaitLoad = true;
         RXDebug.Log(this.GetPosition(), playerPickup.GetPosition());
         this.MoveToFront();
         FLabel label = new FLabel(C.largeFontName, type.ToString().ToUpper() + " SPIRIT");
         C.getCameraInstance().AddChild(label);
         label.y = Futile.screen.halfHeight - label.textRect.height / 2f - 10;
         label.x = Futile.screen.halfWidth + label.textRect.width / 2f + 10;
         world.ShowLoading(() =>
         {
             Go.to(playerPickup, 2.0f, new TweenConfig().floatProp("x", 0).floatProp("y", -15).setEaseType(EaseType.QuadOut));
             Go.to(this, 2.0f, new TweenConfig().floatProp("x", 0).floatProp("y", 15).setEaseType(EaseType.QuadOut));
             Go.to(label, 1.5f, new TweenConfig().floatProp("x", 0).setEaseType(EaseType.BackOut).setDelay(1.5f).onComplete(() =>
             {
                 Go.to(this, .01f, new TweenConfig().floatProp("x", 1, true).onComplete(() =>
                 {
                     Go.to(this, .01f, new TweenConfig().floatProp("x", -2, true).setIterations(100, LoopType.PingPong).onComplete(() =>
                     {
                         FSoundManager.PlaySound("orbExplosion");
                         FSoundManager.PlaySound("powerup");
                         SpawnParticles(30);
                         this.x -= 1;
                         sprite.SetElementByName(type.ToString().ToLower() + "_soul");
                         Go.to(label, 1.5f, new TweenConfig().floatProp("x", -Futile.screen.halfWidth - label.textRect.width / 2f - 10).setEaseType(EaseType.BackIn).setDelay(2.0f).onStart((AbstractTween t) => { }).onComplete(() =>
                         {
                             label.RemoveFromContainer();
                             Go.to(playerPickup, 1.0f, new TweenConfig().floatProp("x", playerRelativePosition.x).floatProp("y", playerRelativePosition.y).setEaseType(EaseType.QuadInOut).onComplete(() =>
                             {
                                 FSoundManager.TweenVolume(1.0f);
                                 p.PickupSoul(this);
                                 world.HideLoading(() => { p.isVisible = true; playerPickup.RemoveFromContainer(); this.RemoveFromContainer(); });
                             }));
                             Vector2 powerupPos;
                             switch(type)
                             {
                                 case SoulType.JUMP:
                                     powerupPos = world.ui.slotAPos;
                                     break;
                                 default:
                                     powerupPos = world.ui.slotBPos;
                                     break;
                             }
                             Go.to(this, 1.0f, new TweenConfig().floatProp("x", powerupPos.x).floatProp("y", powerupPos.y).setEaseType(EaseType.QuadInOut));
                         }));
                     }));
                 }));
             }));
         });
     }
 }
    public void UpdateSolidifyingTrebellaLetters()
    {
        timeSinceLastSolidifiedLetter += Time.deltaTime;

        if (timeSinceLastSolidifiedLetter > 0.5f)
        {
            timeSinceLastSolidifiedLetter -= 0.5f;

            FLabel nextLetterToChange = null;

            switch (numLettersSolidified)
            {
            case 0:
                foreach (FLabel letter in unsolidifiedTrebellaLetters)
                {
                    if (letter.text == "T")
                    {
                        nextLetterToChange = letter;
                        unsolidifiedTrebellaLetters.Remove(letter);
                        break;
                    }
                }
                break;

            case 1:
                foreach (FLabel letter in unsolidifiedTrebellaLetters)
                {
                    if (letter.text == "R")
                    {
                        nextLetterToChange = letter;
                        unsolidifiedTrebellaLetters.Remove(letter);
                        break;
                    }
                }
                break;

            case 2:
                foreach (FLabel letter in unsolidifiedTrebellaLetters)
                {
                    if (letter.text == "E")
                    {
                        nextLetterToChange = letter;
                        unsolidifiedTrebellaLetters.Remove(letter);
                        break;
                    }
                }
                break;

            case 3:
                foreach (FLabel letter in unsolidifiedTrebellaLetters)
                {
                    if (letter.text == "B")
                    {
                        nextLetterToChange = letter;
                        unsolidifiedTrebellaLetters.Remove(letter);
                        break;
                    }
                }
                break;

            case 4:
                foreach (FLabel letter in unsolidifiedTrebellaLetters)
                {
                    if (letter.text == "E")
                    {
                        nextLetterToChange = letter;
                        unsolidifiedTrebellaLetters.Remove(letter);
                        break;
                    }
                }
                break;

            case 5:
                foreach (FLabel letter in unsolidifiedTrebellaLetters)
                {
                    if (letter.text == "L")
                    {
                        nextLetterToChange = letter;
                        unsolidifiedTrebellaLetters.Remove(letter);
                        break;
                    }
                }
                break;

            case 6:
                foreach (FLabel letter in unsolidifiedTrebellaLetters)
                {
                    if (letter.text == "L")
                    {
                        nextLetterToChange = letter;
                        unsolidifiedTrebellaLetters.Remove(letter);
                        break;
                    }
                }
                break;

            case 7:
                foreach (FLabel letter in unsolidifiedTrebellaLetters)
                {
                    if (letter.text == "A")
                    {
                        nextLetterToChange = letter;
                        unsolidifiedTrebellaLetters.Remove(letter);
                        break;
                    }
                }
                break;
            }

            FSoundManager.PlaySound("bomb", 2.0f);
            FLabel solidifiedLetter = trebellaLetters[numLettersSolidified];
            solidifiedLetter.x = nextLetterToChange.x;
            solidifiedLetter.y = nextLetterToChange.y;
            nextLetterToChange.RemoveFromContainer();

            float duration = 0.2f;
            float distance = 5f;

            Tween bounce = new Tween(solidifiedLetter, duration, new TweenConfig()
                                     .setEaseType(EaseType.SineInOut)
                                     .floatProp("y", distance, true));

            Tween bounceBack = new Tween(solidifiedLetter, duration, new TweenConfig()
                                         .setEaseType(EaseType.SineInOut)
                                         .floatProp("y", -distance, true));

            TweenChain chain = new TweenChain();
            chain.setIterations(-1, LoopType.RestartFromBeginning);
            chain.append(bounce);
            chain.append(bounceBack);

            Go.addTween(chain);

            chain.play();

            numLettersSolidified++;

            if (numLettersSolidified >= 8)
            {
                trebellaLettersDoneSolidifying = true;
            }
        }
    }
예제 #12
0
 public void Remove()
 {
     handle.RemoveFromContainer();
     name.RemoveFromContainer();
     nameShadow.RemoveFromContainer();
 }
예제 #13
0
 public override void Destroy()
 {
     base.Destroy();
     shadowText.RemoveFromContainer();
     normalText.RemoveFromContainer();
 }
예제 #14
0
파일: World.cs 프로젝트: maggardJosh/OGREAT
    public void SpawnWords(string message, Vector2 pos, Color color)
    {
        FLabel test = new FLabel(C.smallFontName, message);
        foregroundLayer.AddChild(test);
        test.SetPosition(pos);
        test.color = color;
        test.alpha = 0;
        Go.to(test, .5f, new TweenConfig().floatProp("y", 15, true).floatProp("alpha", 1.0f).setEaseType(EaseType.QuadOut).onComplete(() =>
        {

            Go.to(test, .5f, new TweenConfig().floatProp("y", 10, true));
            Go.to(test, .5f, new TweenConfig().floatProp("alpha", 0).setDelay(.1f).setEaseType(EaseType.QuadOut).onComplete(() => { test.RemoveFromContainer(); }));
        }));
    }
예제 #15
0
파일: World.cs 프로젝트: maggardJosh/OGREAT
    public void NextWave()
    {
        currentState = State.TRANS;
        wave++;
        GetEnemyCounts();
        string waveMessage = wave == 15 ? "INFINITE WAVE\nThanks for playing!" : "WAVE " + wave.ToString();
        FLabel waveLabel = new FLabel(C.largeFontName, waveMessage);
        waveLabel.y = Futile.screen.halfHeight * .5f;
        waveLabel.x = Futile.screen.width;
        C.getCameraInstance().AddChild(waveLabel);
        FSoundManager.PlaySound("transitionIn");
        Go.to(waveLabel, 1.0f, new TweenConfig().floatProp("x", 0).setEaseType(EaseType.BackOut).onComplete(() =>
        {

            Go.to(waveLabel, .7f, new TweenConfig().onStart((t) => { FSoundManager.PlaySound("transitionIn"); }).floatProp("x", -Futile.screen.width).setEaseType(EaseType.BackIn).setDelay(1.0f).onComplete(() => { waveLabel.RemoveFromContainer(); currentState = State.IN_GAME; }));
        }));
    }
    public void OnLetterKilled(AbstractTween tween)
    {
        FLabel letter = (tween as Tween).target as FLabel;

        letter.RemoveFromContainer();
    }
예제 #17
0
    public void OnUpdate()
    {
        switch (state)
        {
            case State.TITLE:
                if (C.getKeyDown(C.ACTION_KEY) || Input.GetMouseButtonDown(0))
                {
                    FSoundManager.PlaySound("menuSelect");
                    float transOut = .6f;
                    Go.killAllTweensWithTarget(tempFollowNode);
                    Futile.instance.SignalUpdate -= OnUpdate;
                    Go.killAllTweensWithTarget(o);
                    Go.killAllTweensWithTarget(g);
                    Go.killAllTweensWithTarget(r);
                    Go.killAllTweensWithTarget(e);
                    Go.killAllTweensWithTarget(a);
                    Go.killAllTweensWithTarget(t);
                    Go.killAllTweensWithTarget(pressStart);
                    Go.to(pressStart, transOut, new TweenConfig().floatProp("alpha", 0).onComplete(() => { pressStart.RemoveFromContainer(); }));
                    Go.to(o, transOut, new TweenConfig().floatProp("y", 100, true).setDelay(.5f).setEaseType(EaseType.BackIn));
                    Go.to(g, transOut, new TweenConfig().floatProp("y", 100, true).setDelay(.6f).setEaseType(EaseType.BackIn));
                    Go.to(r, transOut, new TweenConfig().floatProp("y", 100, true).setDelay(.7f).setEaseType(EaseType.BackIn));
                    Go.to(e, transOut, new TweenConfig().floatProp("y", 100, true).setDelay(.8f).setEaseType(EaseType.BackIn));
                    Go.to(a, transOut, new TweenConfig().floatProp("y", 100, true).setDelay(.9f).setEaseType(EaseType.BackIn));
                    Go.to(t, transOut, new TweenConfig().floatProp("y", 100, true).setDelay(1.0f).setEaseType(EaseType.BackIn).onComplete(() =>
                    {
                        ogreatContainer.RemoveAllChildren();
                        ogreatContainer.RemoveFromContainer();
                        w.ResetVars();
                        w.LoadNewMap("mapOne");
                        madeForLD.RemoveFromContainer();
                        twitter.RemoveFromContainer();
                        FLabel tutorial = new FLabel(C.smallFontName, "WASD - MOVE");
                        tutorial.x = Futile.screen.halfWidth + tutorial.textRect.width;
                        tutorial.y = -Futile.screen.halfHeight * .5f;
                        C.getCameraInstance().AddChild(tutorial);
                        Go.to(tutorial, .7f, new TweenConfig().floatProp("x", 0).setDelay(4.0f).setEaseType(EaseType.BackOut).onComplete(() =>
                            {
                                Go.to(tutorial, .7f, new TweenConfig().setDelay(2.0f).floatProp("x", -Futile.screen.halfWidth - tutorial.textRect.width).setEaseType(EaseType.BackIn).onComplete(() =>
                                    {
                                        tutorial.text = "HOLD LEFT CLICK - ATTACK";
                                        tutorial.x = Futile.screen.halfWidth + tutorial.textRect.width;
                                        Go.to(tutorial, .7f, new TweenConfig().floatProp("x", 0).setEaseType(EaseType.BackOut).onComplete(() =>
                                        {
                                            Go.to(tutorial, .7f, new TweenConfig().setDelay(2.0f).floatProp("x", -Futile.screen.halfWidth - tutorial.textRect.width).setEaseType(EaseType.BackIn).onComplete(() =>
                                                {
                                                    tutorial.text = "... DON'T DIE";
                                                    tutorial.x = Futile.screen.halfWidth + tutorial.textRect.width;
                                                    Go.to(tutorial, .7f, new TweenConfig().floatProp("x", 0).setEaseType(EaseType.BackOut).onComplete(() =>
                                                    {
                                                        Go.to(tutorial, .7f, new TweenConfig().setDelay(2.0f).floatProp("x", -Futile.screen.halfWidth - tutorial.textRect.width).setEaseType(EaseType.BackIn).onComplete(() =>
                                                        {
                                                            tutorial.RemoveFromContainer();
                                                        }));

                                                    }));
                                                }));

                                        }));
                                    }));

                            }));
                    }));
                    Go.killAllTweensWithTarget(madeForLD);
                    Go.killAllTweensWithTarget(twitter);
                    Go.to(madeForLD, transOut, new TweenConfig().floatProp("y", -madeForLD.textRect.height, true).setEaseType(EaseType.BackIn));
                    Go.to(twitter, transOut, new TweenConfig().floatProp("y", -twitter.textRect.height, true).setEaseType(EaseType.BackIn));
                }
                break;
        }
    }
예제 #18
0
 public override void Destroy()
 {
     label.RemoveFromContainer();
     base.Destroy();
 }
예제 #19
0
 public override void Destroy()
 {
     base.Destroy();
     if (myText != null)
         myText.RemoveFromContainer();
 }
예제 #20
0
 public void SpawnPlayer(string spawnName)
 {
     foreach (SpawnPoint s in spawnPoints)
         if (s.name.ToLower() == spawnName.ToLower())
         {
             player.State = Player.PlayerState.IDLE;
             C.Save.lastDoor = spawnName;
             C.lastSave.copy(C.Save);
             if (s.showMapName)
             {
                 FLabel mapNameLabel = new FLabel(C.largeFontName, map.mapName);
                 C.getCameraInstance().AddChild(mapNameLabel);
                 mapNameLabel.SetPosition(new Vector2(Futile.screen.width, Futile.screen.halfHeight * .8f));
                 Go.to(mapNameLabel, 1.5f, new TweenConfig().floatProp("x", 0).setEaseType(EaseType.BackOut).onComplete(() =>
                 {
                     Go.to(mapNameLabel, .7f, new TweenConfig().floatProp("x", -Futile.screen.halfWidth).setDelay(.6f).setEaseType(EaseType.BackIn).onComplete(() => { mapNameLabel.RemoveFromContainer(); }));
                 }));
             }
             s.SpawnPlayer(player);
             return;
         }
 }
예제 #21
0
 public override void HandleRemovedFromStage()
 {
     shadow.RemoveFromContainer();
     Futile.instance.SignalUpdate -= Update;
     base.HandleRemovedFromStage();
 }