상속: FQuadNode
예제 #1
0
    public TitlePage()
    {
        FSprite background = new FSprite("whiteSquare.png");
        background.x = Futile.screen.halfWidth;
        background.y = Futile.screen.halfHeight;
        background.width = Futile.screen.width;
        background.height = Futile.screen.height;
        AddChild(background);

        title = new FLabel("BlairMdITC", "Catch Me!");
        title.color = Color.black;
        title.scale = 0f;
        title.x = Futile.screen.halfWidth;
        title.y = Futile.screen.halfHeight;
        AddChild(title);

        Go.to(title, 0.5f, new TweenConfig().addTweenProperty(new FloatTweenProperty("scale", 1.0f, false)).setEaseType(EaseType.BackInOut).onComplete(HandleTitleDoneInflating));

        FLabel twitter = new FLabel("BlairMdITC", "@wtrebella");
        twitter.color = Color.black;
        twitter.scale = 0f;
        twitter.x = Futile.screen.halfWidth;
        twitter.y = Futile.screen.halfHeight - 50;
        AddChild(twitter);

        Go.to(twitter, 0.5f, new TweenConfig().addTweenProperty(new FloatTweenProperty("scale", 0.5f, false)).setDelay(0.5f).setEaseType(EaseType.BackInOut));
    }
예제 #2
0
 public static void checkForWin()
 {
     playersLeft = 0;
     foreach (bool living in LivingPlayers)
     {
         if (living == true)
         {
             playersLeft++;
         }
     }
     if (playersLeft == 1)
     {
         int winningPlayerIndex = LivingPlayers.IndexOf(true);
         winningPlayer = (winningPlayerIndex + 1).ToString();
         FLabel announceWin = new FLabel("FranchiseFont_Scale1", "PLAYER " + winningPlayer + " WINS!");
         instance.AddChild(announceWin);
         Ships[winningPlayerIndex].destroyShip();
         Ships[winningPlayerIndex].RemoveFromContainer();
         Ships.Clear();
         Bullets.Clear();
         Asteroids.Clear();
         LivingPlayers.Clear();
         instance.AddChild(escapeMenu);
     }
 }
예제 #3
0
    public InGamePage()
    {
        FSprite bg = new FSprite("Atlases/bg");
        bg.width = Futile.screen.width;
        bg.height = Futile.screen.height;
        AddChild(bg);
        hudStuff = new FLabel("Minecraftia", "Energy:");
        hudShadow = new FLabel("Minecraftia", "Energy:");
        hudStuff.scale = 0.7f;
        hudShadow.scale = 0.7f;
        hudShadow.color = Color.black;
        hudStuff.SetPosition(new Vector2(0  , (Futile.screen.height/2)*0.9f));
        hudShadow.SetPosition(new Vector2( 1f, ((Futile.screen.height / 2) * 0.9f - 1)));

        gameArea = new FContainer();
        enemies = new List<Entity>();
        projectiles = new List<Entity>();
        Enemyprojectiles = new List<Entity>();
        entityContainer = new FContainer();
        projectileContainer = new FContainer();
        particleContainer = new FContainer();
        gameArea.AddChild(particleContainer);
        particleContainer.AddChild(projectilesParticles = new FParticleSystem(300));

        gameArea.AddChild(entityContainer);
        gameArea.AddChild(projectileContainer);
        AddChild(gameArea);
        InGamePage.CurrentInGamePage = this;
        ListenForUpdate(Update);
        jugador = new Player();
        GenerateFoe();

        AddChild(hudShadow);
        AddChild(hudStuff);
    }
예제 #4
0
    public override void Start()
    {
        _startButton = new FButton("boton");

        _startButton.AddLabel("font","Play!",new Color(0,0,20,1f));
        _startButton.scale=2f;
        _titleLabel = new FLabel("font","Super Futile Box");
        _instLabel = new FLabel("font","- Move with Arrow keys \n - Press 'space' to jump \n - Down key to fast fall \n - Avoid enemies!!! \n \n Tune:  Barymag #2 - 8 by Lukasz Sychowicz (X-Ray)");
        AddChild(_startButton);
        AddChild(_titleLabel);
        AddChild(_instLabel);
        _titleLabel.x = 0f;
        _titleLabel.y = 100f;

        _instLabel.x = 0f;
        _instLabel.y = -150f;

        _startButton.SignalRelease += HandleStartButtonRelease;

        _startButton.x = 0f;
        _startButton.y = 0f;

            Go.to(_startButton, 0.5f, new TweenConfig().
            setDelay(0.3f).
            floatProp("scale",1.0f).
            setEaseType(EaseType.BackOut));
    }
예제 #5
0
    override public void Start()
    {
        _background = new FSprite("JungleBlurryBG");
        AddChild(_background);

        //the banana container will make it easy to keep the bananas at the right depth
        _foodContainer = new FContainer();
        AddChild(_foodContainer);
        List <string> foodList = new List <string>();

        foodList.Add("Monkey_0");
        for (int i = 0; i < 8; ++i)
        {
            foodList.Add("Banana");
        }
        LayOutFood(foodList);
        //Clear out selected list
        BMain.instance.selected_foods.Clear();

        _closeButton = new FButton("CloseButton_normal", "CloseButton_down", "CloseButton_over", "ClickSound");
        AddChild(_closeButton);
        _closeButton.SignalRelease += HandleCloseButtonRelease;

        _scoreLabel         = new FLabel("Franchise", "0 Bananas");
        _scoreLabel.anchorX = 0.0f;
        _scoreLabel.anchorY = 1.0f;
        _scoreLabel.scale   = 0.75f;
        _scoreLabel.color   = new Color(1.0f, 0.90f, 0.0f);

        _timeLabel         = new FLabel("Franchise", ((int)_secondsLeft) + " Seconds Left");
        _timeLabel.anchorX = 1.0f;
        _timeLabel.anchorY = 1.0f;
        _timeLabel.scale   = 0.75f;
        _timeLabel.color   = new Color(1.0f, 1.0f, 1.0f);

        AddChild(_scoreLabel);
        AddChild(_timeLabel);

        _effectHolder = new FContainer();
        AddChild(_effectHolder);

        _scoreLabel.alpha = 0.0f;
        Go.to(_scoreLabel, 0.5f, new TweenConfig().
              setDelay(0.0f).
              floatProp("alpha", 1.0f));

        _timeLabel.alpha = 0.0f;
        Go.to(_timeLabel, 0.5f, new TweenConfig().
              setDelay(0.0f).
              floatProp("alpha", 1.0f).
              setEaseType(EaseType.BackOut));

        _closeButton.scale = 0.0f;
        Go.to(_closeButton, 0.5f, new TweenConfig().
              setDelay(0.0f).
              floatProp("scale", 1.0f).
              setEaseType(EaseType.BackOut));

        HandleResize(true);         //force resize to position everything at the start
    }
예제 #6
0
    public ExitConfirm()
    {
        //Create and show menu buttons
        title        = new FLabel("FranchiseFont_Scale1", "QUIT?");
        title.y      = 100.0f;
        title.scaleX = 1.75f;
        title.scaleY = 1.75f;
        AddChild(title);

        mainMenuButton = new FButton("YellowButton_normal.png", "YellowButton_over.png");
        mainMenuButton.AddLabel("FranchiseFont_Scale1", "NO", Color.white);
        mainMenuButton.x = -75.0f;
        mainMenuButton.y = -50.0f;
        AddChild(mainMenuButton);

        exitButton = new FButton("YellowButton_normal.png", "YellowButton_over.png");
        exitButton.AddLabel("FranchiseFont_Scale1", "YES", Color.white);
        exitButton.x = 75.0f;
        exitButton.y = -50.0f;
        AddChild(exitButton);



        //Adds listener to menu buttons that calls the associated function
        mainMenuButton.SignalRelease += MainMenuButtonRelease;
        exitButton.SignalRelease     += ExitButtonRelease;
    }
예제 #7
0
    public LevelOverScreen(bool won, bool lastLevel = false)
        : base()
    {
        transparentBackground        = new FSprite(Futile.whiteElement);
        transparentBackground.color  = Color.black;
        transparentBackground.alpha  = 0;
        transparentBackground.width  = Futile.screen.width;
        transparentBackground.height = Futile.screen.height;
        if (won)
        {
            levelCompleteLabel = new FLabel("Large", "Level Complete!\n\nClick to Continue");
        }
        else
        {
            levelCompleteLabel = new FLabel("Large", "You Ran Out Of Time!\n\nClick to Retry");
        }

        if (lastLevel)
        {
            levelCompleteLabel.text = "Level Complete!\n\nThat was the last level!!!\n\nThanks for Playing\n\n\n                             Jif";
        }
        levelCompleteLabel.alpha = 0;

        AddChild(transparentBackground);
        AddChild(levelCompleteLabel);
    }
예제 #8
0
    public InGamePage()
    {
        _background = new FSprite("JungleBlurryBG");
        AddChild(_background);

        _player1 = new PDPaddle("Player1");
        _player2 = new PDPaddle("Player2");
        _ball    = new PDBall();
        ResetPaddles();
        ResetBall();
        AddChild(_player1);
        AddChild(_player2);
        AddChild(_ball);
        ListenForUpdate(Update);

        lblScore1         = new FLabel("arial", _player1.name + ": " + _player1.score);
        lblScore1.anchorX = 0;
        lblScore1.anchorY = 0;
        lblScore1.x       = -Futile.screen.halfWidth;
        lblScore1.y       = -Futile.screen.halfHeight;

        lblScore2         = new FLabel("arial", _player2.name + ": " + _player2.score);
        lblScore2.anchorX = 1.0f;         //Anchor at the right edge.
        lblScore2.anchorY = 0;
        lblScore2.x       = Futile.screen.halfWidth;
        lblScore2.y       = -Futile.screen.halfHeight;

        AddChild(lblScore1);
        AddChild(lblScore2);
    }
예제 #9
0
    public override void Start()
    {
        ShowTitle("FSplitSprite\nClick anywhere to change splitRatio.");

        _sprite=new FSplitSprite("Banana");
        //_sprite.splitRatio=RXRandom.Float();
        _sprite.bottomColor=Color.white;
        _sprite.topColor=Color.gray;
        _sprite.scale=2f;
        _sprite.y=40f;
        AddChild(_sprite);
        _label=new FLabel(Config.fontFile,"splitRatio=\n"+_sprite.splitRatio);
        AddChild(_label);
        _label.scale=0.5f;
        _label.y=_sprite.y-_sprite.textureRect.height*0.5f*_sprite.scaleY;

        _bar=new HealthBar(2,2,50,8,0.5f);
        //_bar.alpha=1f;
        AddChild(_bar);
        _bar.y=_label.y-20-_label.textRect.height*_label.scaleY*0.5f;

        FLabel label=new FLabel(Config.fontFile,"HealthBar by Matt");
        AddChild(label);
        label.scale=0.5f;
        label.y=_bar.y-label.textRect.height*label.scaleY*0.5f-8;

        base.Start();
    }
    public void AnimateFinalNoteLabelIn()
    {
        finalNoteAnimating = true;

        foreach (FLabel label in finalNoteLabels)
        {
            if (!label.isVisible)
            {
                currentFinalNoteLabel = label;
                break;
            }
        }

        if (currentFinalNoteLabel == null)
        {
            Debug.Log("Oops, no unused labels");
            return;
        }

        currentFinalNoteLabel.isVisible = true;
        currentFinalNoteLabel.text      = finalNoteStrings[finalNoteStringIndex];

        finalNoteStringIndex++;

        currentFinalNoteLabel.y = Futile.screen.height + 100f;
        Go.to(currentFinalNoteLabel, 0.5f, new TweenConfig()
              .floatProp("y", Futile.screen.halfHeight)
              .setEaseType(EaseType.SineInOut)
              .onComplete(OnFinalNoteLabelFinishedAppearing));
    }
예제 #11
0
    public ScoreBox(Slot slot)
    {
        this.slot = slot;

        mathMode = new RXTweenable(0.0f,HandleMathModeChange);

        base.Init(slot.player);

        contentContainer.AddChild(_scoreLabel = new FLabel("Raleway",""));
        _scoreLabel.color = Color.black;

        _baseLabel = new FLabel("Raleway","123");
        _baseLabel.color = Color.black;

        _deltaLabel = new FLabel("Raleway","22");
        _deltaLabel.color = Color.black;

        _signIcon = new FSprite("Icons/Plus");
        _signIcon.color = Color.black;

        _equalsIcon = new FSprite("Icons/Equals");
        _equalsIcon.color = Color.black;

        _skullSprite = new FSprite("Icons/Skull");
        _skullSprite.color = Color.black;

        slot.player.SignalScoreChange += HandleScoreChange;

        ListenForUpdate(HandleUpdate);
        HandleMathModeChange();
        HandleScoreChange();
    }
예제 #12
0
 public MUIPlayerTag(AbstractPhysicalObject player, string name, Color color, MultiplayerHUD owner)
 {
     //MonklandUI.AddMessage($"Added label for player {name}[{AbstractPhysicalObjectHK.GetField(player).owner}]");
     this.player          = player;
     this.labelName       = name;
     this.pos             = new Vector2(-1000f, -1000f);
     this.gradient        = new FSprite("Futile_White", true);
     this.gradient.shader = owner.hud.rainWorld.Shaders["FlatLight"];
     this.owner           = owner;
     this.owner.hud.fContainers[0].AddChild(this.gradient);
     this.gradient.alpha = 0f;
     this.gradient.x     = -1000f;
     this.label          = new FLabel("font", labelName);
     this.color          = color;
     this.label.color    = color;
     this.owner.hud.fContainers[0].AddChild(this.label);
     this.label.alpha       = 0f;
     this.label.x           = -1000f;
     this.arrowSprite       = new FSprite("Multiplayer_Arrow", true);
     this.arrowSprite.color = color;
     this.owner.hud.fContainers[0].AddChild(this.arrowSprite);
     this.arrowSprite.alpha = 0f;
     this.arrowSprite.x     = -1000f;
     this.blink             = 1f;
 }
예제 #13
0
    public ScoreBox(Slot slot)
    {
        this.slot = slot;

        mathMode = new RXTweenable(0.0f, HandleMathModeChange);

        base.Init(slot.player);

        contentContainer.AddChild(_scoreLabel = new FLabel("Raleway", ""));
        _scoreLabel.color = Color.black;

        _baseLabel       = new FLabel("Raleway", "123");
        _baseLabel.color = Color.black;

        _deltaLabel       = new FLabel("Raleway", "22");
        _deltaLabel.color = Color.black;

        _signIcon       = new FSprite("Icons/Plus");
        _signIcon.color = Color.black;

        _equalsIcon       = new FSprite("Icons/Equals");
        _equalsIcon.color = Color.black;

        _skullSprite       = new FSprite("Icons/Skull");
        _skullSprite.color = Color.black;

        slot.player.SignalScoreChange += HandleScoreChange;

        ListenForUpdate(HandleUpdate);
        HandleMathModeChange();
        HandleScoreChange();
    }
예제 #14
0
    override public void Start()
    {
        root         = FPWorld.Create(64.0f);
        screenCenter = new Vector2(Futile.screen.halfWidth, Futile.screen.halfHeight);
        ListenForUpdate(Update);
        _gameObjects = new FContainer();
        AddChild(_gameObjects);
        _enemyContainer = new FContainer();
        AddChild(_enemyContainer);
        AddChild(impactParticles      = new FParticleSystem(40));
        AddChild(projectilesParticles = new FParticleSystem(300));
        _playerBullets = new FContainer();
        AddChild(_playerBullets);

        t = Time.time;

        CreateWorld();
        InitPlayer();
        scoreLabel = new FLabel("font", "Score = " + Score);
        gameOver   = new FLabel("font", "Game Over, press 'R' to try again!");
        scoreLabel.SetAnchor(new Vector2(0, -10));
        AddChild(scoreLabel);

        FSoundManager.PlayMusic("Barymag");
        FSoundManager.isMuted = false;
    }
예제 #15
0
    public PlayerSelectPanel(Player player)
    {
        this.player = player;

        if(GameManager.instance.shouldUseTeams)
        {
            FSliceSprite teamBG = new FSliceSprite("Selection_BG", 528, 208, 16, 16, 16, 16);
            AddChild(teamBG);
            teamBG.alpha = 0.9f;
            teamBG.color = player.team.color;
        }

        AddChild(background = new FSliceSprite("Popup_BG",520,200,16,16,16,16));
        background.color = player.color;
        background.alpha = 0.4f;

        AddChild(nameLabel = new FLabel("CubanoBig", player.name));
        nameLabel.scale = 1.0f;
        nameLabel.y = 30.0f;

        AddChild(readyLabel = new FLabel("CubanoBig", ""));
        readyLabel.y = -30.0f;
        readyLabel.scale = 0.75f;

        AddChild(button = new FButton("Popup_BG"));
        button.sprite.width = 520;
        button.sprite.height = 200;
        button.alpha = 0.0f; //hidden button
        button.SignalPress += HandleSignalPress;

        ListenForUpdate(HandleUpdate);

        UpdateState();
    }
예제 #16
0
    private void TurnBegin()
    {
        var curTeam = this.CurrentTeam;

        Debug.Log("[[Team Turn Begin]] Team: " + curTeam.Name);

        if (this.turnLabel == null)
        {
            this.turnLabel       = new FLabel("courier", "Current Team: " + curTeam.Name);
            this.turnLabel.x     = 250;
            this.turnLabel.y     = 50;
            this.turnLabel.color = Color.black;
            this.hud.AddChild(this.turnLabel);
        }
        else
        {
            this.turnLabel.text = "Current Team: " + curTeam.Name;
        }

        this.teamActorCount          = curTeam.Members.Count;
        this.actorsProcessedThisTurn = 0;
        foreach (var actor in this.Map.Actors.Where(a => a.Team == curTeam))
        {
            actor.TurnState = ActorState.CommandsAvailable;
            foreach (var ability in actor.Properties.AllAbilities)
            {
                ability.DecrementCooldown();
            }
        }

        this.turnState = TurnState.TurnMiddle;
    }
예제 #17
0
    public TitlePage()
    {
        FSprite background = new FSprite("whiteSquare.png");

        background.x      = Futile.screen.halfWidth;
        background.y      = Futile.screen.halfHeight;
        background.width  = Futile.screen.width;
        background.height = Futile.screen.height;
        AddChild(background);

        title       = new FLabel("BlairMdITC", "Catch Me!");
        title.color = Color.black;
        title.scale = 0f;
        title.x     = Futile.screen.halfWidth;
        title.y     = Futile.screen.halfHeight;
        AddChild(title);

        Go.to(title, 0.5f, new TweenConfig().addTweenProperty(new FloatTweenProperty("scale", 1.0f, false)).setEaseType(EaseType.BackInOut).onComplete(HandleTitleDoneInflating));

        FLabel twitter = new FLabel("BlairMdITC", "@wtrebella");

        twitter.color = Color.black;
        twitter.scale = 0f;
        twitter.x     = Futile.screen.halfWidth;
        twitter.y     = Futile.screen.halfHeight - 50;
        AddChild(twitter);

        Go.to(twitter, 0.5f, new TweenConfig().addTweenProperty(new FloatTweenProperty("scale", 0.5f, false)).setDelay(0.5f).setEaseType(EaseType.BackInOut));
    }
 public void OnFinalNoteLabelFinishedHiding(AbstractTween tween)
 {
     finalNoteAnimating = false;
     finalNoteShowing   = false;
     currentFinalNoteLabel.isVisible = false;
     currentFinalNoteLabel           = null;
 }
예제 #19
0
        public MonklandUI(FStage stage)
        {
            displayMessages = new List <QuickDisplayMessage>();
            uiLabels        = new List <FLabel>();
            worldStage      = stage;

            uiContainer = new FContainer();

            string text = "Monkland " + Monkland.VERSION;

            if (!MonklandSteamManager.DEBUG)
            {
                text = "";
            }

            statusLabel           = new FLabel("font", text);
            statusLabel.alignment = FLabelAlignment.Left;
            statusLabel.SetPosition(50.01f, Futile.screen.height - 49.99f);
            uiContainer.AddChild(statusLabel);

            for (int i = 0; i < 200; i++)
            {
                FLabel displayLabel = new FLabel("font", "");
                displayLabel.alignment = FLabelAlignment.Left;
                uiContainer.AddChild(displayLabel);
                uiLabels.Add(displayLabel);
            }

            displayMessages.Clear();
            stage.AddChild(uiContainer);
        }
 public TLabelDisplayLayer() : base("")
 {
     stringQueue     = new List <string>();
     label           = new FLabel("SoftSugar", "");
     label.isVisible = false;
     AddChild(label);
 }
예제 #21
0
 public ConfirmBox(Rect bounds, string caption)
 {
     this.bounds = bounds;
     pos         = bounds.center;
     VoezEditor.confirmBoxOpen = true;
     text = new FLabel("Raleway32", caption);
 }
예제 #22
0
        override public void OnEnter()
        {
            FSprite spr = new FSprite("castle");

            spr.x = Futile.screen.halfWidth;
            spr.y = Futile.screen.height; spr.anchorY = 1.0f;
            mParent.AddChild(spr);

            FSprite portrait = new FSprite("portrait1lg");

            portrait.anchorX = 0;
            portrait.anchorY = 0;
            mParent.AddChild(portrait);

            speech           = new FLabel("mainfont", "");
            speech.x        += portrait.width + 20;
            speech.y        += Futile.screen.height - 260;
            speech.anchorY   = 1.0f;
            speech.alignment = FLabelAlignment.Left;
            speech.color     = new UnityEngine.Color(0.768f, 0.768f, 0.768f);
            mParent.AddChild(speech);

            skipTip           = new FLabel("mainfont", "Spacebar - Skip");
            skipTip.x         = Futile.screen.width;
            skipTip.y         = 0;
            skipTip.anchorY   = 0f;
            skipTip.color     = new UnityEngine.Color(0.768f, 0.768f, 0.768f);
            skipTip.alignment = FLabelAlignment.Right;
            mParent.AddChild(skipTip);
        }
    // Use this for initialization
    void Start()
    {
        FutileParams fParms = new FutileParams(false, false, true, true);

        fParms.AddResolutionLevel(1024.0f, 1.0f, 1.0f, "");
        fParms.origin = new Vector2(0.5f, 0.5f);
        Futile.instance.Init(fParms);

        Futile.atlasManager.LoadAtlas("Atlases/art");
        Futile.atlasManager.LoadFont("Franchise", "FranchiseFontAtlas.png", "Atlases/FranchiseLarge");

        FSprite background = new FSprite("background.png");

        Futile.stage.AddChild(background);
        Futile.stage.AddChild(mBombaNode  = new FContainer());
        Futile.stage.AddChild(mPepperNode = new FContainer());

        mPepperNode.AddChild(mPepper = new Pepper(new FireDelegate(fire)));

        mSeed = new Seed(18, mPepper.y + mPepper.height / 2 - 15);
        Futile.stage.AddChild(mSeed);

        mScoreLabel         = new FLabel("Franchise", "Score :");
        mScoreLabel.anchorX = 0;
        mScoreLabel.anchorY = 1;
        mScoreLabel.color   = new Color(1.0f, 0.90f, 0.0f);
        mScoreLabel.x       = -Futile.halfWidth;
        mScoreLabel.y       = Futile.halfHeight;

        Futile.stage.AddChild(mScoreLabel);

        Futile.touchManager.AddSingleTouchTarget(this);

        FSoundManager.PlayMusic("music", 0.45f);
    }
예제 #24
0
        override public void OnEnter()
        {
            titleLabel         = new FLabel("mainfont", "THE CALLING");
            titleLabel.anchorX = 0.5f;
            titleLabel.anchorY = 0.5f;
            titleLabel.x       = Futile.screen.halfWidth;
            titleLabel.y       = Futile.screen.halfHeight;
            titleLabel.color   = new UnityEngine.Color(0.768f, 0.768f, 0.768f);
            mParent.AddChild(titleLabel);

            garnetLabel         = new FLabel("mainfont", "Cut Garnet Games");
            garnetLabel.anchorX = 0.5f;
            garnetLabel.anchorY = -0.5f;
            garnetLabel.x       = Futile.screen.halfWidth;
            garnetLabel.y       = Futile.screen.halfHeight / 2;
            garnetLabel.color   = UnityEngine.Color.red;
            mParent.AddChild(garnetLabel);

            /*instructionLabel = new FLabel("mainfont", "Press A Key");
             * instructionLabel.anchorX = 0.5f;
             * instructionLabel.anchorY = 1.0f;
             * instructionLabel.x = Futile.screen.halfWidth;
             * instructionLabel.y = Futile.screen.height;
             * instructionLabel.color = new UnityEngine.Color(0.768f, 0.768f, 0.768f);
             * mParent.AddChild(instructionLabel);*/
        }
예제 #25
0
    public StateTitle(StateGame game)
        : base(TITLE)
    {
        //Initialize
        m_Game		= game;
        m_Time		= BLINK_DURATION * 2;
        m_StartTime = START_DURATION * 2;

        //Create background
        FSprite Background	= new FSprite("rect") { x = Futile.screen.halfWidth, y = Futile.screen.halfHeight, width = Futile.screen.width, height = Futile.screen.height, color = new Color(0, 0, 0, 0.5f) };
        AddChild(Background);

        //Create stuff
        m_Title			= new FSprite("logo") 						{ x = Futile.screen.halfWidth, y = Futile.screen.height * 0.6f };
        m_Instruction1	= new FLabel("font", "Tap screen to play") 	{ x = Futile.screen.halfWidth, y = Futile.screen.height * 0.2f };
        AddChild(m_Instruction1);
        AddChild(m_Title);

        //Credit
        /*FLabel Credit1	= new FLabel("visitor-small", "A game by Karunia Ramadhan, Namira Chaldea, and Raka Mahesa") { x = Futile.screen.halfWidth };
        Credit1.y = 4 + (Credit1.textRect.height * 0.5f);
        AddChild(Credit1);*/

        //Play music
        FSoundManager.PlayMusic("bgm", 1f);
    }
예제 #26
0
    override public void Start()
    {
        _startButton = new FButton("boton");

        _startButton.AddLabel("font", "Play!", new Color(0, 0, 20, 1f));
        _startButton.scale = 2f;
        _titleLabel        = new FLabel("font", "Super Futile Box");
        _instLabel         = new FLabel("font", "- Move with Arrow keys \n - Press 'space' to jump \n - Down key to fast fall \n - Avoid enemies!!! \n \n Tune:  Barymag #2 - 8 by Lukasz Sychowicz (X-Ray)");
        AddChild(_startButton);
        AddChild(_titleLabel);
        AddChild(_instLabel);
        _titleLabel.x = 0f;
        _titleLabel.y = 100f;

        _instLabel.x = 0f;
        _instLabel.y = -150f;


        _startButton.SignalRelease += HandleStartButtonRelease;

        _startButton.x = 0f;
        _startButton.y = 0f;

        Go.to(_startButton, 0.5f, new TweenConfig().
              setDelay(0.3f).
              floatProp("scale", 1.0f).
              setEaseType(EaseType.BackOut));
    }
예제 #27
0
파일: ScoreScreen.cs 프로젝트: jrendel/LD27
    public override void Start()
    {
        // once play navigates away from home screen, don't play the intro when they return
        Main.instance.playIntro = false;

        FSprite background = new FSprite("viewport");
        background.SetAnchor(0.0f, 0.0f);
        AddChild(background);

        string backButtonText = "Back";
        string titleText = "About The Game";
        if (Main.instance.gameFinished){
            // Display end game messages
            titleText = "The Ship Went Nuclear!";

            _scoreLabel = new FLabel("Emulogic", "You Saved " + Main.instance.crewSaved + " Crew Members");
            _scoreLabel.color = Color.black; // new Color(0.173f, 0.722f, 0.976f, 1.0f);
            _scoreLabel.scale = 0.25f;
            _scoreLabel.SetPosition(Futile.screen.halfWidth, Futile.screen.halfHeight + Futile.screen.halfHeight / 2);

            AddChild(_scoreLabel);

            _againButton = new FButton("buttonWide");
            _againButton.AddLabel("Emulogic","Play Again",Color.black);  //new Color(0.45f,0.25f,0.0f,1.0f)
            _againButton.label.scale = 0.25f;
            _againButton.SetPosition(Futile.screen.halfWidth, Futile.screen.halfHeight + 80);
            AddChild(_againButton);

            _againButton.SignalRelease += HandleAgainButtonRelease;

            backButtonText = "Home";
        } else {
            // diplay generic message
        }

        _textLabel = new FLabel("Emulogic", titleText);
        _textLabel.color = Color.black;
        _textLabel.scale = 0.5f;
        _textLabel.SetPosition(Futile.screen.halfWidth, Futile.screen.halfHeight + Futile.screen.halfHeight * 2 / 3);

        AddChild(_textLabel);

        _quitButton = new FButton("buttonWide");
        _quitButton.AddLabel("Emulogic",backButtonText,Color.black);  //new Color(0.45f,0.25f,0.0f,1.0f)
        _quitButton.label.scale = 0.25f;
        _quitButton.SetPosition(Futile.screen.halfWidth, Futile.screen.halfHeight);
        AddChild(_quitButton);

        _quitButton.SignalRelease += HandleQuitButtonRelease;

        string about = "Game Designed and created by Jason Rendel,\nfor Ludum Dare 27. My first game jam ever!\nCreated for the 48 hour competition.\n\n ---- Tools ----\n Unity 3d - Futile - Gimp \nTexture Packer - Glyph Designer - CFXR\n\nFollow me @jasonrendel\nCheck out what else I'm up to at www.jasonrendel.com";

        _scoreLabel = new FLabel("Emulogic", about);
        _scoreLabel.color = Color.black;
        _scoreLabel.scale = 0.20f;
        _scoreLabel.SetPosition(Futile.screen.halfWidth, 200);

        AddChild(_scoreLabel);
    }
예제 #28
0
 public void ShowWinner()
 {
     winnerLbl           = new FLabel("Abadi55", Data.winner.ToString());
     winnerLbl.x         = (Screen.width / 2) - 100;
     winnerLbl.y         = 225;
     winnerLbl.alignment = FLabelAlignment.Center;
     stage.AddChild(winnerLbl);
 }
예제 #29
0
    public ImLabelComponent(string name, string fontName, string labelString, Color labelColor, float labelScale) : base(name)
    {
        componentType_ = ComponentType.Label;

        label_       = new FLabel(fontName, labelString);
        label_.scale = labelScale;
        label_.color = labelColor;
    }
 public TLabelDisplayLayer()
     : base("")
 {
     stringQueue = new List<string>();
     label = new FLabel("SoftSugar", "");
     label.isVisible = false;
     AddChild(label);
 }
예제 #31
0
    public FinalPage()
    {
        title = new FLabel("font", "Congratulations!, you made it, you are awesome. \n Thanks for playing this crappy game");
        title.scale = 0.9f;
        message = new FLabel("font", "press Enter to play again.");
        message.scale = 0.8f;

        ListenForUpdate(Update);
    }
예제 #32
0
    public ZeroBox()
    {
        Init(Player.NullPlayer);

        contentContainer.AddChild(_scoreLabel = new FLabel("Raleway", ""));
        _scoreLabel.color = Color.black;

        UpdateResetAmount();
    }
예제 #33
0
    public ImLabelComponent(string name, string fontName, string labelString, Color labelColor, float labelScale)
        : base(name)
    {
        componentType_ = ComponentType.Label;

        label_ = new FLabel(fontName, labelString);
        label_.scale = labelScale;
        label_.color = labelColor;
    }
예제 #34
0
 public override void Start()
 {
     //CoroutineRunner.StartFutileCoroutine(setScore("philz", BaseMain.Instance._score));
     FSoundManager.PlayMusic("dino_menu");
     _title = new FLabel("BitOut", string.Format(menuString, selection));
     this.AddChild(_title);
     _title.color = new Color(1.0f, 0.9f, 0.2f);
     //_bestScoreLabel.y = Futile.screen.halfHeight/1.25f;
 }
예제 #35
0
        public ItemContainerVisualizer(MenuFlow menu, ItemContainer itemContainer) : base(menu)
        {
            _itemContainer = itemContainer;

            _itemAmount = new FLabel("font", string.Empty);
            _itemAmount.SetPosition(new Vector2(4f, -4f));

            itemContainer.SignalItemChange += OnItemChanged;
        }
예제 #36
0
 public InputButton(InputGraphic parent, Vector2 pos, string keyName, Func <Inputs, bool> inputGetter) : this(parent, pos, inputGetter)
 {
     _key = new FLabel("font", keyName);
     Move(Vector2.zero);
     AddToContainer();
     if (scale < 0.75f)
     {
         _key.text = keyName.Substring(0, 1);
     }
 }
예제 #37
0
 public Button(string fontName, string text, Vector2 pos, float size, bool diamond)
 {
     this.pos = pos;
     this.size = size;
     this.diamond = diamond;
     myColor = Color.black;
     myAlpha = 0.75f;
     visible = true;
     myText = new FLabel(fontName, text);
 }
예제 #38
0
    public DualLabel(string fontName, string text, Color mainColor, Color shadowColor)
    {
        AddChild(shadowLabel = new FLabel(fontName, text));
        AddChild(mainLabel = new FLabel(fontName, text));

        mainLabel.color = mainColor;
        shadowLabel.color = shadowColor;

        shadowLabel.y = -1; //move the shadow down 1
    }
예제 #39
0
    public TrackEditor(Vector2 pos, ProjectData.TrackData data)
    {
        this.data = data;
        this.pos  = pos;
        numLines  = 3;

        valueLabel = new FLabel("Raleway16", "Value: ");
        startLabel = new FLabel("Raleway16", "Spawn Time: " + VoezEditor.Editor.BeatTimeStamp(data.start));
        endLabel   = new FLabel("Raleway16", "Despawn Time: " + VoezEditor.Editor.BeatTimeStamp(data.end));
    }
예제 #40
0
    public NoteEditor(Vector2 pos, ProjectData.NoteData data)
    {
        this.data = data;
        this.pos  = pos;

        typeLabel = new FLabel("Raleway24", "Type:");
        timeLabel = new FLabel("Raleway24", "Spawn Time: " + VoezEditor.Editor.BeatTimeStamp(data.time));
        holdLabel = new FLabel("Raleway24", "Hold Duration: " + VoezEditor.Editor.BeatTimeStamp(data.hold));
        dirLabel  = new FLabel("Raleway24", "Direction:");
    }
예제 #41
0
        public OptionsMenu(LoopFlow pausingTarget) : base(pausingTarget, true, 0.5f, 0.5f)
        {
            AddElement(new FadePanel(this));

            _panel = new RoundedRect(this);
            AddElement(_panel);

            _label = new FLabel("font", "Not yet.");
            container.AddChild(_label);
        }
예제 #42
0
    public DualLabel(string fontName, string text, Color mainColor, Color shadowColor)
    {
        AddChild(shadowLabel = new FLabel(fontName, text));
        AddChild(mainLabel   = new FLabel(fontName, text));

        mainLabel.color   = mainColor;
        shadowLabel.color = shadowColor;

        shadowLabel.y = -1;         //move the shadow down 1
    }
예제 #43
0
    override public void Start()
    {
        BMain.instance.score = 0;

        _background = new FSprite("JungleBlurryBG.png");
        AddChild(_background);

        //the banana container will make it easy to keep the bananas at the right depth
        _bananaContainer = new FContainer();
        AddChild(_bananaContainer);


        _closeButton = new FButton("CloseButton_normal.png", "CloseButton_over.png", "ClickSound");
        AddChild(_closeButton);


        _closeButton.SignalRelease += HandleCloseButtonRelease;

        _scoreLabel         = new FLabel("Franchise", "0 Bananas");
        _scoreLabel.anchorX = 0.0f;
        _scoreLabel.anchorY = 1.0f;
        _scoreLabel.scale   = 0.75f;
        _scoreLabel.color   = new Color(1.0f, 0.90f, 0.0f);

        _timeLabel         = new FLabel("Franchise", ((int)_secondsLeft) + " Seconds Left");
        _timeLabel.anchorX = 1.0f;
        _timeLabel.anchorY = 1.0f;
        _timeLabel.scale   = 0.75f;
        _timeLabel.color   = new Color(1.0f, 1.0f, 1.0f);

        AddChild(_scoreLabel);
        AddChild(_timeLabel);

        _effectHolder = new FContainer();
        AddChild(_effectHolder);

        _scoreLabel.alpha = 0.0f;
        Go.to(_scoreLabel, 0.5f, new TweenConfig().
              setDelay(0.0f).
              floatProp("alpha", 1.0f));

        _timeLabel.alpha = 0.0f;
        Go.to(_timeLabel, 0.5f, new TweenConfig().
              setDelay(0.0f).
              floatProp("alpha", 1.0f).
              setEaseType(EaseType.BackOut));

        _closeButton.scale = 0.0f;
        Go.to(_closeButton, 0.5f, new TweenConfig().
              setDelay(0.0f).
              floatProp("scale", 1.0f).
              setEaseType(EaseType.BackOut));

        HandleResize(true);         //force resize to position everything at the start
    }
예제 #44
0
    public MainMenuPage()
    {
        gameLogo = new FSprite("Futile_White");
        Play = new FButton("Futile_White", "Futile_White");
        title = new FLabel("font", "");
        message = new FLabel("font", "press Enter to begin adventure");

        Play.SignalRelease += PlayRelease;

        ListenForUpdate(Update);
    }
예제 #45
0
    public override void HandleRemovedFromStage()
    {
        Futile.instance.SignalUpdate -= HandleUpdate;

        RemoveChild( background );
        RemoveChild( label );

        background = null;
        label = null;

        base.HandleRemovedFromStage();
    }
예제 #46
0
 public GamePage()
 {
     Debug.Log("In game page");
     hudStuff = new FLabel("font", "Game Stats:");
     hudShadow = new FLabel("font", "Game Stats:");
     hudStuff.SetPosition(new Vector2(Futile.screen.halfWidth / 4, Futile.screen.height - 40));
     hudShadow.SetPosition(new Vector2((Futile.screen.halfWidth / 4)+1f, (Futile.screen.height - 41)));
     hudStuff.scale = 0.3f;
     hudStuff.color = Color.white;
     hudShadow.scale = 0.3f;
     hudShadow.color = Color.black;
 }
예제 #47
0
 public MainMenuPage()
 {
     ListenForUpdate(HandleUpdate);
     ListenForResize(HandleResize);
     inst = new FLabel("Minecraftia", "- Press return to start -");
     inst.y = Futile.screen.halfHeight - 50;
     FSprite title = new FSprite("Atlases/title");
     title.width = Futile.screen.width;
     title.height = Futile.screen.height;
     AddChild(title);
     AddChild(inst);
 }
예제 #48
0
    public TitlePage()
    {
        _title = new FLabel("gamefont", "Xelda Prototype");
        _title.y = 200;
        _title.scale = 2f;
        AddChild(_title);

        _start = new FButton("start_up.png","start_down.png");
        _start.AddLabel("gamefont","Start", Color.white);
        AddChild(_start);

        _start.SignalRelease += HandleManButtonPressed;
    }
예제 #49
0
    public SBKeyCodeLabel(string text, Color baseColor, Color flashColor)
    {
        this.baseColor = baseColor;
        this.flashColor = flashColor;

        label = new FLabel("Silkscreen", text);
        label.anchorX = 0;
        label.anchorY = 1;

        label.y -= 68f;

        AddChild(label);
    }
예제 #50
0
    private void build()
    {
        background = new FSprite( "blank" );
        background.color = Color.black;
        background.isVisible = false;
        AddChild( background );

        label = new FLabel( "Franchise", "FSP: 00.00" );
        //label.scale = 0.3f;
        label.isVisible = false;
        AddChild( label );

        timeleft = updateInterval;
    }
예제 #51
0
    void Start()
    {
        FLabel title = new FLabel("kozuka72r", "Game Title");
        title.anchorY = 1f;
        title.y = Futile.screen.halfHeight - 10f;
        Futile.stage.AddChild(title);

        FLabel version = new FLabel("kozuka14el", "version " + UISetup.VERSION);
        version.anchorX = 1f;
        version.anchorY = 0f;
        version.x = Futile.screen.halfWidth - 10f;
        version.y = -Futile.screen.halfHeight + 10f;
        Futile.stage.AddChild(version);
    }
예제 #52
0
파일: FuckGame.cs 프로젝트: pcasao3/Fukyo
    // Use this for initialization
    public void Start()
    {
        //Display "F***s Given" here
        _givenLabel = new FLabel("Franchise", "Given: 0");
        _givenLabel.scale = 0.75f;
        _givenLabel.anchorX = 0.0f;
        _givenLabel.x = LEFT_EDGE;
        _givenLabel.y = 110.0f;
        AddChild(_givenLabel);

        //Display the current chain here
        _chainLabel = new FLabel("Franchise", "Chain: 0");
        _chainLabel.scale = 0.75f;
        _chainLabel.anchorX = 0.0f;
        _chainLabel.x = LEFT_EDGE;
        _chainLabel.y = 80.0f;
        AddChild(_chainLabel);

        //Display the current bank here
        _bankLabel = new FLabel("Franchise", "Bank: 0");
        _bankLabel.scale = 0.75f;
        _bankLabel.anchorX = 0.0f;
        _bankLabel.x = LEFT_EDGE;
        _bankLabel.y = 50.0f;
        AddChild(_bankLabel);

        //Display the current chain time here
        _timerLabel = new FLabel("Franchise", "Time: 0s");
        _timerLabel.scale = 0.75f;
        _timerLabel.anchorX = 0.0f;
        _timerLabel.x = LEFT_EDGE;
        _timerLabel.y = 20.0f;
        AddChild(_timerLabel);

        //Display the current multiplier here
        _multLabel = new FLabel("Franchise", "x1.0");
        _multLabel.scale = 0.75f;
        _multLabel.anchorX = 0.0f;
        _multLabel.x = RIGHT_EDGE-100;
        _multLabel.y = 90.0f;
        AddChild(_multLabel);

        //Display the current chain time here
        /*
        _killTimeLabel = new FLabel("Franchise", "Time: 0s");
        _killTimeLabel.anchorX = 0.0f;
        _killTimeLabel.x = RIGHT_EDGE-200;
        _killTimeLabel.y = 60.0f;
        AddChild(_killTimeLabel);*/
    }
    // Use this for initialization
    void Start()
    {
        FutileParams fparams = new FutileParams(true, true, false, false);
        fparams.AddResolutionLevel(480.0f, 2.0f, 1.0f, "");
        fparams.origin = new Vector2(0.5f, 0.5f);
        fparams.backgroundColor = new Color(0.15f, 0.15f, 0.3f);
        Futile.instance.Init(fparams);

        // load image atlas (within Resources/Atlases folder)
        Futile.atlasManager.LoadAtlas("Atlases/Burglar");

        // Add tilemap
        FTilemap room1 = new FTilemap("Burglar Walls");
        room1.LoadCSV("CSVs/Room1Map"); // load comma separated text file (within Resources/CSVs folder)
        room1.x = -room1.width/2;
        room1.y -= 4;
        Futile.stage.AddChild(room1);

        // create burglar
        burglar = new FAnimatedSprite("Burglar");
        burglar.y = -24;
        int[] frames = { 1,1,2,1,1,1,10,1,11,1 }; // idle anim
        burglar.addAnimation(new FAnimation("idle", frames, 400, true));
        int[] frames2 = { 3,4,5,6,4,7 }; // run anim
        burglar.addAnimation(new FAnimation("run", frames2, 180, true));
        Futile.stage.AddChild(burglar); // add burglar to stage

        // load font atlas
        Futile.atlasManager.LoadAtlas("Atlases/Fonts");

        // Add large font text
        Futile.atlasManager.LoadFont("Large", "Large Font", "Atlases/Large Font");
        FLabel label1 = new FLabel("Large", "LARGE FONT");
        label1.y = 26;
        Futile.stage.AddChild(label1);

        // Add small font text
        Futile.atlasManager.LoadFont("Small", "Small Font", "Atlases/Small Font");
        FLabel label2 = new FLabel("Small", "Small Font");
        label2.y = 12;
        Futile.stage.AddChild(label2);

        // Add tiny font text
        Futile.atlasManager.LoadFont("Tiny", "Tiny Font", "Atlases/Tiny Font");
        FLabel label3 = new FLabel("Tiny", "Tiny Font");
        label3.y = 3;
        Futile.stage.AddChild(label3);
    }
예제 #54
0
    public Dialogue()
    {
        dialogueBG = new FSprite("dialogueBG");
        dialogueBG.isVisible = false;
        this.y = -Futile.screen.halfHeight - dialogueBG.height / 2;
        this.AddChild(dialogueBG);

        indicator = new InteractInd(Futile.screen.halfWidth - 12, -7);
        indicator.ignoreTransitioning = true;
        this.AddChild(indicator);

        message = new FLabel(C.smallFontName, "");
        message.alignment = FLabelAlignment.Center;
        this.AddChild(message);
        message.isVisible = false;
    }
예제 #55
0
    public ImUILayer()
    {
        /*zoomInButton = new FButton("whiteSquare.png", "whiteSquare.png", null);
        zoomOutButton = new FButton("whiteSquare.png", "whiteSquare.png", null);
        zoomInButton.data = UIButtonType.ZoomIn;
        zoomOutButton.data = UIButtonType.ZoomOut;
        zoomInButton.sprite.color = Color.blue;
        zoomOutButton.sprite.color = Color.red;
        zoomInButton.sprite.width = zoomOutButton.sprite.width = 40f;
        zoomInButton.sprite.height = zoomOutButton.sprite.height = 20f;
        zoomInButton.anchorX = zoomOutButton.anchorX = 1f;
        zoomInButton.anchorY = zoomOutButton.anchorY = 1f;
        float padding = 5f;
        zoomInButton.x = zoomOutButton.x = Futile.screen.width - padding;
        zoomInButton.y = Futile.screen.height - padding;
        zoomOutButton.y = zoomInButton.y - zoomInButton.sprite.height - padding;
        AddChild(zoomInButton);
        AddChild(zoomOutButton);*/

        float margin = 10f;
        float paddingBetweenShit = 10f;

        dollarsLabel = new FLabel("TwCen", string.Format("$" + ImPlayerStats.dollars));
        dollarsLabel.anchorX = 0;
        dollarsLabel.anchorY = 1;
        dollarsLabel.x = margin;
        dollarsLabel.y = Futile.screen.height - margin;
        dollarsLabel.scale = 0.25f;
        AddChild(dollarsLabel);

        pauseButton = new FSprite("transportPause.psd");
        playButton = new FSprite("transportPlayPressed.psd");

        pauseButton.color = playButton.color = new Color(0.8f, 0.8f, 1.0f, 1.0f);

        pauseButton.anchorX = playButton.anchorX = 0;
        pauseButton.anchorY = playButton.anchorY = 1;

        pauseButton.x = margin;
        playButton.x = pauseButton.x + pauseButton.width;
        playButton.y = pauseButton.y = dollarsLabel.y - dollarsLabel.textRect.height * dollarsLabel.scaleY - paddingBetweenShit;

        AddChild(pauseButton);
        AddChild(playButton);

        ImPlayerStats.SignalDollarsChanged += HandleDollarsChanged;
    }
예제 #56
0
	public FLabel AddLabelB (string fontName, string text, float scale, float offsetY, Color color)
	{
		if(_labelB != null) 
		{
			RemoveChild(_labelB);
		}

		_labelB = new FLabel(fontName, text);
		AddChild(_labelB);
		_labelB.color = color;
		_labelB.anchorX = _labelB.anchorY = 0.5f;
		_labelB.x = -_anchorX*_bg.width+_bg.width/2;
		_labelB.y = -_anchorY*_bg.height+_bg.height/2 + offsetY;
		_labelB.scale = scale;
		
		return _labelB;
	}
예제 #57
0
    public override void HandleAddedToStage()
    {
        base.HandleAddedToStage();

        background = new FSprite( "blank" );
        background.color = Color.black;
        background.isVisible = false;
        AddChild( background );

        label = new FLabel( "Franchise", title + ": 0" );
        //label.scale = 0.3f;
        label.isVisible = false;
        label.color = Color.white;
        AddChild( label );

        Futile.instance.SignalUpdate += HandleUpdate;
    }
예제 #58
0
    public OptionsPage()
    {
        FSprite bg = new FSprite("Futile_White");
        bg.width = Futile.screen.width;
        bg.height = Futile.screen.height;
        bg.color = Color.gray;
        bg.x = Futile.screen.width / 2;
        bg.y = Futile.screen.height / 2;
        AddChild(bg);
        // Labels
        moonwalkLabel = new FLabel("font","Moon walk");
        lefthandedLabel = new FLabel("font","Left handed controls");
        screenshakeLabel = new FLabel("font","Screenshake intensity");
        controlsScale = new FLabel("font", "Controls scale");

        moonwalkLabel.alignment = FLabelAlignment.Left;
        lefthandedLabel.alignment = FLabelAlignment.Left;
        screenshakeLabel.alignment = FLabelAlignment.Left;
        controlsScale.alignment = FLabelAlignment.Left;

        SaveAndReturn = new FButton("Futile_White", "Futile_White");
        SaveAndReturn.SignalRelease += SaveAndReturnSignal;

        // Buttons and probs the slider for screenshake?
        moonwalkButton = new FButton("radioOn");
        moonwalkButton.expansionAmount = 40f;
        if(GameConfig.isMoonWalkingActive)
            moonwalkButton.SetElements("radioOn", "radioOn", "radioOn");
        else
            moonwalkButton.SetElements("radioOff", "radioOff", "radioOff");

        moonwalkButton.SignalRelease += HandleMoonWalkButton;

        lefthandedButton = new FButton("radioOn");
        lefthandedButton.expansionAmount = 40f;
        if(GameConfig.isLeftHandedActive)
            lefthandedButton.SetElements("radioOn", "radioOn","radioOn");
        else
            lefthandedButton.SetElements("radioOff", "radioOff", "radioOff");

        lefthandedButton.SignalRelease += HandleLeftiesButton;

        shakeSlider = new RSlider("sliderBar", "sliderIndicator", GameConfig.screenShakeIntensity);
        scaleSlider = new RSlider("sliderBar", "sliderIndicator", GameConfig.virtualControlsSize);
    }
예제 #59
0
 public virtual void ShowTitle(string title)
 {
     if (_titleLabel==null) {
         _titleLabelBg=new FSprite("Futile_White");
         AddChild(_titleLabelBg);
         _titleLabelBg.color=Color.black;
         _titleLabelBg.alpha=0.5f;
         _titleLabel=new FLabel(Config.fontFile,title,Config.textParams);
         AddChild(_titleLabel);
         _titleLabel.scale=0.5f;
     } else {
         _titleLabel.text=title;
     }
     _titleLabel.y=Futile.screen.halfHeight-_titleLabel.textRect.height*_titleLabel.scaleY*0.5f;
     _titleLabelBg.y=_titleLabel.y;
     _titleLabelBg.scaleX=(_titleLabel.textRect.width*_titleLabel.scaleX+10f)/_titleLabelBg.textureRect.width;
     _titleLabelBg.scaleY=(_titleLabel.textRect.height*_titleLabel.scaleY+10f)/_titleLabelBg.textureRect.height;
 }
예제 #60
0
    public override void Start()
    {
        //CoroutineRunner.StartFutileCoroutine(setScore("philz", BaseMain.Instance._score));
        SetupScroller();

        FSoundManager.PlayMusic("dino_menu");

        scoreArea = new FContainer();
        this.AddChild(scoreArea);
        _bestScoreLabel = new FLabel("BitOut", "best scores!\n\n");
        scoreArea.AddChild(_bestScoreLabel);
        _bestScoreLabel.color = new Color(1.0f, 0.9f, 0.2f);
        _bestScoreLabel.anchorY = 1;
        _bestScoreLabel.y = Futile.screen.halfHeight/1.25f;
        _bestScoreLabel.shader = new FShader("Wavey", Shader.Find("Wavey"), 10);

        CoroutineRunner.StartFutileCoroutine(PausedText());
    }