Beispiel #1
0
        public void Draw()
        {
            GameDevice.Instance().GetGraphicsDevice().Clear(Color.Black);
            var tutorialDrawer = Drawer.Default;
            var easyDrawer     = Drawer.Default;
            var normalDrawer   = Drawer.Default;
            var hardDrawer     = Drawer.Default;
            var drawer         = Drawer.Default;
            var renderer       = Renderer.Instance;

            if (difficultyNumber == (int)Difficulty.tutorial)
            {
                tutorialDrawer.Alpha = flashing.GetAlpha();
                easyDrawer.Alpha     = notSelectAlpha;
                normalDrawer.Alpha   = notSelectAlpha;
                hardDrawer.Alpha     = notSelectAlpha;
                nowPos = defaultDrawPos;
            }
            if (difficultyNumber == (int)Difficulty.easy)
            {
                tutorialDrawer.Alpha = notSelectAlpha;
                easyDrawer.Alpha     = flashing.GetAlpha();
                normalDrawer.Alpha   = notSelectAlpha;
                hardDrawer.Alpha     = notSelectAlpha;
                nowPos = defaultDrawPos + difficultySpace;
            }
            if (difficultyNumber == (int)Difficulty.normal)
            {
                tutorialDrawer.Alpha = notSelectAlpha;
                easyDrawer.Alpha     = notSelectAlpha;
                normalDrawer.Alpha   = flashing.GetAlpha();
                hardDrawer.Alpha     = notSelectAlpha;
                nowPos = defaultDrawPos + difficultySpace * 2;
            }
            if (difficultyNumber == (int)Difficulty.hard)
            {
                tutorialDrawer.Alpha = notSelectAlpha;
                easyDrawer.Alpha     = notSelectAlpha;
                normalDrawer.Alpha   = notSelectAlpha;
                hardDrawer.Alpha     = flashing.GetAlpha();
                nowPos = defaultDrawPos + difficultySpace * 3;
            }

            Renderer.Instance.Begin();
            fishEnemies.ForEach(f => f.Draw());
            renderer.DrawTexture("menu_explanation", Vector2.Zero, drawer);
            renderer.DrawTexture(difficultyName[(int)Difficulty.tutorial], defaultDrawPos, tutorialDrawer);
            renderer.DrawTexture(difficultyName[(int)Difficulty.easy], defaultDrawPos + difficultySpace, easyDrawer);
            renderer.DrawTexture(difficultyName[(int)Difficulty.normal], defaultDrawPos + difficultySpace * 2, normalDrawer);
            renderer.DrawTexture(difficultyName[(int)Difficulty.hard], defaultDrawPos + difficultySpace * 3, hardDrawer);
            player.Draw();
            Renderer.Instance.End();
        }
Beispiel #2
0
        public override void Draw()
        {
            var players = GameObjectManager.Instance.Find <Player>();

            if (players.Count == 0)
            {
                return;
            }
            var drawer = Drawer.Default;

            if (downTimer.IsTime)
            {
                drawer.Alpha = death.GetAlpha();
            }
            else
            {
                drawer.Alpha = hitAlpha;
            }
            drawer.DisplayModify = true;
            if (IsInScreen())
            {
                HpBar();
            }
            base.Draw(drawer);
        }
Beispiel #3
0
        public void Draw()
        {
            GameDevice.Instance().GetGraphicsDevice().Clear(Color.Black);
            renderer.Begin();

            var cleardrawer = new Drawer();
            var backDrawer  = new Drawer();

            cleardrawer.Alpha = alpha;
            backDrawer.Alpha  = flashing.GetAlpha();
            renderer.DrawTexture("clear", new Vector2(Screen.Width / 2 - 342 / 2, Screen.Height / 2 - 234 / 2), cleardrawer);
            renderer.DrawTexture("back_to_title", new Vector2(0, Screen.Height * 7 / 8), backDrawer);
            particleManager.Draw();

            renderer.End();
        }
Beispiel #4
0
        public void Draw()
        {
            GameDevice.Instance().GetGraphicsDevice().Clear(Color.Black);

            var gameOverdrawer = Drawer.Default;
            var backDrawer     = Drawer.Default;

            gameOverdrawer.Alpha = gameOverFlash.GetAlpha();
            backDrawer.Alpha     = flashing.GetAlpha();

            Renderer.Instance.Begin();
            Renderer.Instance.DrawTexture("testgameover", Vector2.Zero, gameOverdrawer);
            if (gameOverFlash.EndFlashing())
            {
                Renderer.Instance.DrawTexture("back_to_title", new Vector2(0, Screen.Height * 3 / 4), backDrawer);
            }
            Renderer.Instance.End();
        }
Beispiel #5
0
        public void Draw()
        {
            GameDevice.Instance().GetGraphicsDevice().Clear(Color.Black);

            renderer.Begin();

            var titledrawer = new Drawer();

            titledrawer.Rectangle = animation.GetRectangle();
            renderer.DrawTexture("title", new Vector2(20, 0), titledrawer);

            var pressdrawer = new Drawer();

            pressdrawer.Alpha = flashing.GetAlpha();
            renderer.DrawTexture("press_space_key", new Vector2(4, 690), pressdrawer);

            particleManager.Draw();
            titlePlayer.Draw();
            jellyEnemies.ForEach(e => e.Draw());

            renderer.End();
        }