public FlappyBirdMainGameScene(string _name) : base(_name) { FlappyBirdProperties.Init(); SEObject background = new SEObject("background"); background.GetComponent().GetSpriteComponent().SetSprite(SEResourcesManager.GetSpriteByName("background-day")); background.GetComponent().GetTransformComponent().SetSize(SEProperties.GetGameWindowWidth(), SEProperties.GetGameWindowHeight()); background.GetComponent().GetSpriteComponent().SetLayerDepth(1.0f); AddChild(background); bird = new Bird(); AddChild(bird); obstacleManager = new ObstacleManager(); AddChild(obstacleManager); Ground ground = new Ground(); AddChild(ground); AddChild(FlappyBirdProperties.GetScoreLabel()); AddChild(FlappyBirdProperties.GetHighScoreLabel()); AddChild(FlappyBirdProperties.GetTextLabel()); }
public void Collapse() { FlappyBirdProperties.SetBirdFlyStatus(false); FlappyBirdProperties.GetTextLabel().GetComponent().GetFontComponent().SetText("Tap on space to reload game"); FlappyBirdProperties.GetTextLabel().SetEnable(true); component.GetTransformComponent().SetSpeed(8); #if DEBUG Console.WriteLine("Collapse"); #endif }
public void WaitRunGame() { component.GetActionComponent().StartAction("changeSprite"); if (SEKeyboardManager.CheckKeyDown(Keys.Space)) { Jump(); FlappyBirdProperties.SetBirdFlyStatus(true); FlappyBirdProperties.SetGameWaitingStatus(false); FlappyBirdProperties.GetTextLabel().SetEnable(false); } }