public override void Start() { _background = new FSprite("JungleBlurryBG.png"); AddChild(_background); //this will scale the background up to fit the screen //but it won't let it shrink smaller than 100% _monkey = new BMonkey(); AddChild(_monkey); _monkey.x = -5.0f; _monkey.y = -2.0f; _againButton = new FButton("YellowButton_normal.png", "YellowButton_over.png", "ClickSound"); _againButton.AddLabel("Franchise","AGAIN?",new Color(0.45f,0.25f,0.0f,1.0f)); AddChild(_againButton); _againButton.y = -110.0f; _againButton.SignalRelease += HandleAgainButtonRelease; _scoreLabel = new FLabel("Franchise", BMain.instance.score+" Bananas"); AddChild(_scoreLabel); _scoreLabel.color = new Color(1.0f,0.9f,0.2f); _scoreLabel.y = 110.0f; if(BMain.instance.score > BMain.instance.bestScore) { BMain.instance.bestScore = BMain.instance.score; _isNewBestScore = true; } else { _isNewBestScore = false; } _bestScoreLabel = new FLabel("Franchise", "Best score: " + BMain.instance.bestScore+" Bananas"); AddChild(_bestScoreLabel); _bestScoreLabel.scale = 0.5f; _bestScoreLabel.anchorX = 1.0f; _bestScoreLabel.anchorY = 0.0f; _bestScoreLabel.color = new Color(1.0f,0.9f,0.2f); _scoreLabel.scale = 0.0f; Go.to(_scoreLabel, 0.5f, new TweenConfig(). setDelay(0.3f). floatProp("scale",1.0f). setEaseType(EaseType.BackOut)); _monkey.scale = 0.0f; Go.to(_monkey, 0.5f, new TweenConfig(). setDelay(0.1f). floatProp("scale",1.0f). setEaseType(EaseType.BackOut)); _againButton.scale = 0.0f; Go.to(_againButton, 0.5f, new TweenConfig(). setDelay(0.3f). floatProp("scale",1.0f). setEaseType(EaseType.BackOut)); HandleResize(true); //force resize to position everything at the start }
override public void Start() { _background = new FSprite("JungleBlurryBG.png"); AddChild(_background); //this will scale the background up to fit the screen //but it won't let it shrink smaller than 100% _monkey = new BMonkey(); AddChild(_monkey); _monkey.x = -5.0f; _monkey.y = -2.0f; _againButton = new FButton("YellowButton_normal.png", "YellowButton_over.png", "ClickSound"); _againButton.AddLabel("Franchise", "AGAIN?", new Color(0.45f, 0.25f, 0.0f, 1.0f)); AddChild(_againButton); _againButton.y = -110.0f; _againButton.SignalRelease += HandleAgainButtonRelease; _scoreLabel = new FLabel("Franchise", BMain.instance.score + " Bananas"); AddChild(_scoreLabel); _scoreLabel.color = new Color(1.0f, 0.9f, 0.2f); _scoreLabel.y = 110.0f; if (BMain.instance.score > BMain.instance.bestScore) { BMain.instance.bestScore = BMain.instance.score; _isNewBestScore = true; } else { _isNewBestScore = false; } _bestScoreLabel = new FLabel("Franchise", "Best score: " + BMain.instance.bestScore + " Bananas"); AddChild(_bestScoreLabel); _bestScoreLabel.scale = 0.5f; _bestScoreLabel.anchorX = 1.0f; _bestScoreLabel.anchorY = 0.0f; _bestScoreLabel.color = new Color(1.0f, 0.9f, 0.2f); _scoreLabel.scale = 0.0f; Go.to(_scoreLabel, 0.5f, new TweenConfig(). setDelay(0.3f). floatProp("scale", 1.0f). setEaseType(EaseType.BackOut)); _monkey.scale = 0.0f; Go.to(_monkey, 0.5f, new TweenConfig(). setDelay(0.1f). floatProp("scale", 1.0f). setEaseType(EaseType.BackOut)); _againButton.scale = 0.0f; Go.to(_againButton, 0.5f, new TweenConfig(). setDelay(0.3f). floatProp("scale", 1.0f). setEaseType(EaseType.BackOut)); HandleResize(true); //force resize to position everything at the start }