Exemplo n.º 1
0
        public void Draw(Renderer renderer)
        {
            renderer.Begin();
            //仮マップ
            for (int i = 0; i < Screen.ScreenWidth / 50 + 50; i++)
            {
                for (int j = 0; j < Screen.ScreenHeight / 50 + 50; j++)
                {
                    renderer.DrawTexture("tile", new Vector2(i * 50, j * 50));
                }
            }

            unchis.ForEach(u => u.Draw(renderer));
            walls.ForEach(w => w.Draw(renderer));
            glasses.ForEach(g => g.Draw(renderer));
            players.ForEach(p => p.Draw(renderer));

            if (Wave.currentWave == 3)
            {
                renderer.DrawTexture("Yoru", Vector2.Zero, 0.5f);
            }

            renderer.DrawTexture("UI", Vector2.Zero, new Rectangle(0, 0, 300, Screen.ScreenHeight));


            count.Draw(renderer);



            renderer.DrawTexture("chicken", StocPos.stocPosUI);
            renderer.DrawTexture("pig", StocPos.stocPos2UI);
            renderer.DrawTexture("cow", StocPos.stocPos3UI);
            renderer.DrawTexture("glass", StocPos.stockGlassUI);


            wave.Draw(renderer);

            camp.Draw(renderer);

            if (wave.isClearFlag && !wave.IsFinalWave())
            {
                renderer.DrawTexture("nextday", nextDayPos);
                renderer.DrawTexture("hand", new Vector2((int)(Input.MousePosition.X - 25), (int)(Input.MousePosition.Y - 25)));
                handFlag = false;
                renderer.End();
                return;
            }


            if (wave.IsFinalWave() && wave.isClearFlag || wave.isEndFlag)
            {
                renderer.DrawTexture("resultUI_title", goTitlePos);
                renderer.DrawTexture("hand", new Vector2((int)(Input.MousePosition.X - 25), (int)(Input.MousePosition.Y - 25)));
                handFlag = false;
                renderer.End();
                return;
            }

            if (!handFlag)
            {
                renderer.DrawTexture("hand", new Vector2((int)(Input.MousePosition.X - 25), (int)(Input.MousePosition.Y - 25)));
            }
            else
            {
                renderer.DrawTexture("hand2", new Vector2((int)(Input.MousePosition.X - 25), (int)(Input.MousePosition.Y - 25)));
                if (Input.IsMouseLButtonDown() && Input.MousePosition.X > 300)
                {
                    handFlag = false;
                }
            }


            renderer.End();
        }