Пример #1
0
        /// <summary>
        /// Clear段階表示 by柏
        /// </summary>
        /// <param name="renderer">描画用クラス</param>
        /// <param name="gameTime">ゲーム時間</param>
        public void DrawClear(Renderer renderer, GameTime gameTime)
        {
            if (clearLevel < 0)
            {
                clearSelect.Draw(gameTime, renderer, camera.Scale);
                return;
            }
            float size = (clearLevel < Parameter.ClearFireworksLevel) ? (1 - clearLevelTimer.Rate()) : 1.0f;
            int   Y    = 100;
            int   X    = (int)(Parameter.ScreenWidth / 2 - Renderer.GetTexture("text").Width / 2 * size * 2);

            renderer.DrawTexture("text", new Vector2(X, Y), new Rectangle(0, 7 * Parameter.TextHeight, Parameter.TextWidth, Parameter.TextHeight), size * 2, 1);

            particleControl.Draw(renderer);
            if (clearLevel > Parameter.ClearSelectLevel)
            {
                clearSelect.Draw(gameTime, renderer, camera.Scale);
            }
        }
Пример #2
0
        //描画の開始と終了は全部Game1のDrawに移動した
        public void Draw(GameTime gameTime, Renderer renderer)
        {
            renderer.DrawTexture("backGround", Vector2.Zero);

            for (int i = 0; i < map.Data.GetLength(0); i++)
            {
                for (int j = 0; j < map.Data.GetLength(1); j++)
                {
                    //動かないマップチップはここで描画 by 長谷川修一
                    if (MapManager.GetNowMapArr()[i, j] == 1 || MapManager.GetNowMapArr()[i, j] == 2)
                    {
                        renderer.DrawTexture("TileMapSource", map.GetBlockPosition(new BlockIndex(j, i)) + camera.OffSet, GetRect(map.Data[i, j]));
                    }
                }
            }

            foreach (var x in map.MapThings)//By 佐瀬 拓海
            {
                x.Draw(gameTime, renderer, camera.OffSet);
            }

            player.Draw(gameTime, renderer, camera.OffSet);

            fires.ForEach(x => x.Draw(gameTime, renderer, camera.OffSet));

            waterLines.ForEach(x => x.Draw(gameTime, renderer, camera.OffSet));

            clearSelect.Draw(renderer);

            fireMeter.Draw(renderer, player);

            //炭の取得数を描画 By佐瀬拓海
            renderer.DrawTexture("coal", new Vector2(1088, 64));
            renderer.DrawNumber("number", new Vector2(1152, 64), coals.Count - nowCoals.Count);
            renderer.DrawNumber("number", new Vector2(1182, 64), "/", 1);
            renderer.DrawNumber("number", new Vector2(1216, 64), coals.Count);

            //playTimeの表示(柏)
            int[] playtime = stageSever.TimeCalculat(playTime / 60);
            renderer.DrawNumber("number", new Vector2(1152, 128), playtime[0]);
            renderer.DrawNumber("number", new Vector2(1182, 128), "/", 1);
            renderer.DrawNumber("number", new Vector2(1216, 128), playtime[1]);
        }