コード例 #1
0
        public void Draw()
        {
            blurEffect.WriteRenderTarget(renderer.FogManager.CurrentColor());
            switch (nextScene)               //背景は前のシーンを描画
            {
            case SceneType.Dungeon:
                dungeonScene.Draw();
                break;

            case SceneType.Town:
                townScene.Draw();
                break;

            case SceneType.Boss:
                bossScene.Draw();
                break;
            }
            blurEffect.ReleaseRenderTarget();
            blurEffect.Draw(renderer);


            renderer.Begin();

            ui.Draw();

            renderer.End();
        }
コード例 #2
0
        public void Draw()
        {
            blurEffect.WriteRenderTarget(renderer.FogManager.CurrentColor());
            townScene.Draw();                       //背景は前のシーンを描画
            renderer.Begin();
            guildUI.DrawBackground();
            renderer.End();
            blurEffect.ReleaseRenderTarget();
            blurEffect.Draw(renderer);

            renderer.Begin();
            DrawUI();
            renderer.End();
        }
コード例 #3
0
        public void Draw()
        {
            blurEffect.WriteRenderTarget(renderer.FogManager.CurrentColor());
            townScene.Draw();           //前のシーンを描画

            renderer.Begin();
            ui.DrawBackGround();        //ダンジョンイメージ
            renderer.End();

            blurEffect.ReleaseRenderTarget();
            blurEffect.Draw(renderer);


            renderer.Begin();

            ui.Draw();

            renderer.End();
        }
コード例 #4
0
        public void Draw()
        {
            blurEffect.WriteRenderTarget(renderer.FogManager.CurrentColor());
            townScene.Draw();                       //背景は前のシーンを描画
            blurEffect.ReleaseRenderTarget();
            blurEffect.Draw(renderer);


            renderer.Begin();

            renderer.DrawString("戻る", new Vector2(0, windowHeight - 64), new Vector2(1, 1), Color.White);

            leftWindow.Draw();
            rightWindow.Draw();
            messegeWindow.Draw();
            buyWindow.Draw();
            sellWindow.Draw();

            if (mode == ShopMode.select)
            {
                renderer.DrawString("いらっしゃい! 何しに来たんだい?", messegeWindow.GetCenter(), Color.White, new Vector2(1, 1), 1.0f, true, true);
                renderer.DrawString("買う", buyButton.ButtonCenterVector(), Color.White, new Vector2(1, 1), 1.0f, true, true);
                renderer.DrawString("売る", sellButton.ButtonCenterVector(), Color.White, new Vector2(1, 1), 1.0f, true, true);
            }
            else
            {
                if (mode == ShopMode.buy)
                {
                    renderer.DrawString("売り物リスト", new Vector2(64, 64), new Vector2(1, 1), Color.White);
                    renderer.DrawString("買う物リスト", new Vector2(windowWidth / 2 + 64, 64), new Vector2(1, 1), Color.White);
                    store.DrawEquip();
                }
                else if (mode == ShopMode.sell)
                {
                    renderer.DrawString("持ち物リスト", new Vector2(64, 64), new Vector2(1, 1), Color.White);
                    renderer.DrawString("売る物のリスト", new Vector2(windowWidth / 2 + 64, 64), new Vector2(1, 1), Color.White);
                    store.DrawEquip();
                }
            }
            renderer.End();
        }
コード例 #5
0
        public void Draw()
        {
            blurEffect.WriteRenderTarget(renderer.FogManager.CurrentColor());
            townScene.Draw();                       //背景は前のシーンを描画
            blurEffect.ReleaseRenderTarget();
            blurEffect.Draw(renderer);

            renderer.Begin();

            backWindow.Draw();
            renderer.DrawString("戻る", backButton.ButtonCenterVector(),
                                Color.White, new Vector2(1, 1), 1.0f, true, true);

            leftWindow.Draw();
            rightWindow.Draw();
            messegeWindow.Draw();
            equipmentWindow.Draw();
            consumptionWindow.Draw();

            rightPageRightWindow.Draw();
            rightPageLeftWindow.Draw();
            leftPageRightWindow.Draw();
            leftPageLeftWindow.Draw();

            if (mode == DepotModeType.select)
            {
                renderer.DrawString("どっちに用があるんだい?", messegeWindow.GetCenter(),
                                    Color.White, new Vector2(1, 1), 1.0f, true, true);
                renderer.DrawString("装備品", equipmentButton.ButtonCenterVector(),
                                    Color.White, new Vector2(1, 1), 1.0f, true, true);
                renderer.DrawString("消費アイテム", consumptionButton.ButtonCenterVector(),
                                    Color.White, new Vector2(1, 1), 1.0f, true, true);
            }

            if (mode == DepotModeType.equipment)
            {
                renderer.DrawString("倉庫(" + depotNowNum + "/" + depotMaxNum + ")", new Vector2(windowWidth / 2 + 64, 64),
                                    new Vector2(1, 1), Color.White);
            }

            if (mode == DepotModeType.consumption || mode == DepotModeType.equipment)
            {
                renderer.DrawString("バッグ(" + bagNowNum + "/" + bagMaxNum + ")", new Vector2(64, 64),
                                    new Vector2(1, 1), Color.White);
                renderer.DrawString("倉庫", new Vector2(windowWidth / 2 + 64, 64),
                                    new Vector2(1, 1), Color.White);

                renderer.DrawString("ページ(" + leftPage + "/" + leftMaxPage + ")", new Vector2(windowWidth / 4 - 48, windowHeight - 96), new Vector2(1, 1), Color.White);
                renderer.DrawString("ページ(" + rightPage + "/" + rightMaxPage + ")", new Vector2(windowWidth - windowWidth / 4 - 48, windowHeight - 96), new Vector2(1, 1), Color.White);

                if (leftPageLeftWindow.CurrentState())
                {
                    renderer.DrawString("←", leftPageLeftWindow.GetCenter(), Color.White, new Vector2(1, 1), 1.0f, true, true);
                }
                if (leftPageRightWindow.CurrentState())
                {
                    renderer.DrawString("→", leftPageRightWindow.GetCenter(), Color.White, new Vector2(1, 1), 1.0f, true, true);
                }
                if (rightPageLeftWindow.CurrentState())
                {
                    renderer.DrawString("←", rightPageLeftWindow.GetCenter(), Color.White, new Vector2(1, 1), 1.0f, true, true);
                }
                if (rightPageRightWindow.CurrentState())
                {
                    renderer.DrawString("→", rightPageRightWindow.GetCenter(), Color.White, new Vector2(1, 1), 1.0f, true, true);
                }

                renderer.DrawString("アイテム名", new Vector2(64, 64 + 32), new Vector2(1, 1), Color.White);
                renderer.DrawString("タイプ", new Vector2(224, 64 + 32), new Vector2(1, 1), Color.White);
                renderer.DrawString("アイテム名", new Vector2(windowWidth / 2 + 64, 64 + 32), new Vector2(1, 1), Color.White);
                renderer.DrawString("タイプ", new Vector2(windowWidth / 2 + 224, 64 + 32), new Vector2(1, 1), Color.White);
                if (mode == DepotModeType.consumption)
                {
                    renderer.DrawString("所持数", new Vector2(windowWidth / 2 + 320, 64 + 32), new Vector2(1, 1), Color.White);
                }

                //左側のリストのアイテムの描画
                for (int i = 0; i < leftPageItems.Count; i++)
                {
                    leftWindows[i].Draw();

                    //アイテム名表示
                    if (leftPageItems[i] is ConsumptionItem)
                    {
                        if (((ConsumptionItem)leftPageItems[i]).GetTypeText() != "矢")
                        {
                            renderer.DrawString(leftPageItems[i].GetItemName(), leftWindows[i].GetOffsetPosition(),
                                                new Vector2(1, 1), Color.White);
                        }
                        else
                        {
                            renderer.DrawString(leftPageItems[i].GetItemName() + "x" + ((ConsumptionItem)leftPageItems[i]).GetStack(),
                                                leftWindows[i].GetOffsetPosition(),
                                                new Vector2(1, 1), Color.White);
                        }
                    }
                    else
                    {
                        renderer.DrawString(leftPageItems[i].GetItemName(), leftWindows[i].GetOffsetPosition(),
                                            new Vector2(1, 1), Color.White);
                    }

                    //アイテムタイプの表示
                    string type;
                    if (leftPageItems[i] is WeaponItem)
                    {
                        type = ((WeaponItem)leftPageItems[i]).GetWeaponType().ToString();
                    }
                    else if (leftPageItems[i] is ProtectionItem)
                    {
                        type = ((ProtectionItem)leftPageItems[i]).GetProtectionType().ToString();
                    }
                    else if (leftPageItems[i] is AccessaryItem)
                    {
                        type = "装飾品";
                    }
                    else
                    {
                        type = ((ConsumptionItem)leftPageItems[i]).GetTypeText();
                    }
                    renderer.DrawString(type, leftWindows[i].GetOffsetPosition() + new Vector2(160, 0),
                                        new Vector2(1, 1), Color.White);
                }

                //右側のリストのアイテムの描画
                for (int i = 0; i < rightPageItems.Count; i++)
                {
                    rightWindows[i].Draw();

                    //アイテム名の表示
                    renderer.DrawString(rightItems[i + (rightPage - 1) * 20].GetItemName(), rightWindows[i].GetOffsetPosition(),
                                        new Vector2(1, 1), Color.White);

                    //アイテムタイプの表示
                    string type;
                    if (rightItems[i + (rightPage - 1) * 20] is WeaponItem)
                    {
                        type = ((WeaponItem)rightItems[i + (rightPage - 1) * 20]).GetWeaponType().ToString();
                    }
                    else if (rightItems[i + (rightPage - 1) * 20] is ProtectionItem)
                    {
                        type = ((ProtectionItem)rightItems[i + (rightPage - 1) * 20]).GetProtectionType().ToString();
                    }
                    else if (rightItems[i + (rightPage - 1) * 20] is AccessaryItem)
                    {
                        type = "装飾品";
                    }
                    else
                    {
                        type = ((ConsumptionItem)rightItems[i + (rightPage - 1) * 20]).GetTypeText();
                    }
                    renderer.DrawString(type, rightWindows[i].GetOffsetPosition() + new Vector2(160, 0),
                                        new Vector2(1, 1), Color.White);

                    //所持数の表示(消費アイテムのみ)
                    if (mode == DepotModeType.consumption)
                    {
                        if (consumptions.ContainsKey(rightItems[i + (rightPage - 1) * 20].GetItemID()))
                        {
                            renderer.DrawString(consumptions[rightItems[i + (rightPage - 1) * 20].GetItemID()].ToString(),
                                                rightWindows[i].GetOffsetPosition() + new Vector2(256, 0),
                                                new Vector2(1, 1), Color.White);
                        }
                    }
                }

                //アイテムの詳細表示
                if (isHintDraw)
                {
                    renderer.DrawTexture("fade", hintInfo.Position + new Vector2(-10, -15),
                                         new Vector2(420, 100), 0.75f);

                    hintInfo.Draw(hintItem, 1.0f);
                }

                //メッセージ関連
                if (isBagMaxMessaga)
                {
                    renderer.DrawString("バッグがいっぱいです。", new Vector2(320, windowHeight / 2), new Vector2(2, 2), Color.Red);
                }

                if (isDepotMaxMessaga && mode == DepotModeType.equipment)
                {
                    renderer.DrawString("倉庫がいっぱいです。", new Vector2(320, windowHeight / 2), new Vector2(2, 2), Color.Red);
                }
            }

            renderer.End();
        }
コード例 #6
0
        public void Draw()
        {
            blurEffect.WriteRenderTarget(renderer.FogManager.CurrentColor());
            townScene.Draw();                       //背景は前のシーンを描画
            blurEffect.ReleaseRenderTarget();
            blurEffect.Draw(renderer);

            renderer.Begin();

            backWindow.Draw();
            renderer.DrawString("戻る", backButton.ButtonCenterVector(),
                                Color.White, new Vector2(1, 1), 1.0f, true, true);
            upgradeWindow.Draw();

            leftWindow.Draw();
            rightWindow.Draw();

            leftPageRightWindow.Draw();
            leftPageLeftWindow.Draw();

            renderer.DrawString("バッグ", new Vector2(64, 64), new Vector2(1, 1), Color.White);
            renderer.DrawString("アイテム名", new Vector2(64, 64 + 32), new Vector2(1, 1), Color.White);
            renderer.DrawString("タイプ", new Vector2(224, 64 + 32), new Vector2(1, 1), Color.White);

            renderer.DrawString("ページ(" + leftPage + "/" + leftMaxPage + ")", new Vector2(windowWidth / 4 - 48, windowHeight - 96), new Vector2(1, 1), Color.White);
            if (leftPageLeftWindow.CurrentState())
            {
                renderer.DrawString("←", leftPageLeftWindow.GetCenter(), Color.White, new Vector2(1, 1), 1.0f, true, true);
            }
            if (leftPageRightWindow.CurrentState())
            {
                renderer.DrawString("→", leftPageRightWindow.GetCenter(), Color.White, new Vector2(1, 1), 1.0f, true, true);
            }

            //左側のリストのアイテムの描画
            for (int i = 0; i < leftPageItems.Count; i++)
            {
                leftWindows[i].Draw();

                //アイテム名表示
                if (leftPageItems[i] is WeaponItem)
                {
                    renderer.DrawString(leftPageItems[i].GetItemName() + "+" + ((WeaponItem)leftPageItems[i]).GetReinforcement(), leftWindows[i].GetOffsetPosition(),
                                        new Vector2(1, 1), Color.White);
                }
                else
                {
                    renderer.DrawString(leftPageItems[i].GetItemName() + "+" + ((ProtectionItem)leftPageItems[i]).GetReinforcement(), leftWindows[i].GetOffsetPosition(),
                                        new Vector2(1, 1), Color.White);
                }

                //アイテムタイプの表示
                string type;
                if (leftPageItems[i] is WeaponItem)
                {
                    type = ((WeaponItem)leftPageItems[i]).GetWeaponType().ToString();
                }
                else if (leftPageItems[i] is ProtectionItem)
                {
                    type = ((ProtectionItem)leftPageItems[i]).GetProtectionType().ToString();
                }
                else
                {
                    type = ((ConsumptionItem)leftPageItems[i]).GetTypeText();
                }
                renderer.DrawString(type, leftWindows[i].GetOffsetPosition() + new Vector2(160, 0),
                                    new Vector2(1, 1), Color.White);
            }

            //右側の表示
            if (isSelect)
            {
                //強化ボタン表示
                renderer.DrawString("強化", upgradeButton.ButtonCenterVector(),
                                    Color.White, new Vector2(2, 2), 1.0f, true, true);

                //選択されたアイテム
                renderer.DrawString("強化前", new Vector2(windowWidth / 2 + 64, 64), new Vector2(1, 1), Color.White);
                selectItemInfoUI.Draw(selectItem, 1.0f);

                //選択されたアイテムの強化後
                if (!isBiggest)
                {
                    renderer.DrawString("強化後", new Vector2(windowWidth / 2 + 64, 192 + 32), new Vector2(1, 1), Color.White);
                    upgradeItemInfoUI.Draw(upgradeItem, 1.0f);
                }

                if (!isBiggest)
                {
                    //必要素材
                    renderer.DrawString("必要な素材",
                                        new Vector2(windowWidth / 2 + 64, 192 + 192), new Vector2(1, 1), Color.White);
                    renderer.DrawString("(所持数 / 必要数)",
                                        new Vector2(windowWidth / 2 + 160, 192 + 192), new Vector2(1, 1), Color.White);

                    int num = 0;
                    foreach (int id in materialItems.Keys)
                    {
                        num++;
                        if (consumptions.Keys.Contains(id))
                        {
                            renderer.DrawString(itemManager.GetConsuptionItem(id).GetItemName() + "(" + consumptions[id] + "/" + materialItems[id] + ")",
                                                new Vector2(windowWidth / 2 + 64, 160 + 224 + 32 * num), new Vector2(1, 1), Color.White);
                        }
                        else
                        {
                            renderer.DrawString(itemManager.GetConsuptionItem(id).GetItemName() + "(0/" + materialItems[id] + ")",
                                                new Vector2(windowWidth / 2 + 64, 160 + 224 + 32 * num), new Vector2(1, 1), Color.White);
                        }
                    }

                    //お金
                    renderer.DrawString("消費金額 : " + useMoney,
                                        rightWindow.GetLeftUnder() + new Vector2(0, -32), new Vector2(1, 1), Color.White);
                }
            }

            messegeWindow.Draw();

            if (isBiggest || !isEnough || !isMoney)
            {
                upgradeWindow.Draw();
            }
            string messageText = "noMessage";

            if (isNotEnoughMessage)
            {
                messageText = "素材が足りていません";
            }
            if (isNoMoneyMessage)
            {
                if (messageText == "noMessage")
                {
                    messageText = "お金が足りていません";
                }
                else
                {
                    messageText = "素材とお金が足りていません。";
                }
            }
            if (isBiggestMessage)
            {
                messageText = "レベルが最大です。";
            }

            if (messageText != "noMessage")
            {
                renderer.DrawString(messageText, messegeWindow.GetCenter(), Color.Red, new Vector2(2, 2), 1.0f, true, true);
            }

            renderer.End();
        }