コード例 #1
0
        private void Main4()
        {
            // *.INIT
            {
                // アプリ固有 >

                波紋効果.INIT();

                // < アプリ固有
            }

            //DDTouch.Touch(); // moved -> Logo

            if (DDConfig.LOG_ENABLED)
            {
                DDEngine.DispDebug = () =>
                {
                    DDPrint.SetPrint();
                    DDPrint.SetBorder(new I3Color(0, 0, 0));

                    DDPrint.DebugPrint(string.Join(
                                           " ",
                                           波紋効果.Count,
                                           Game.I == null ? "-" : "" + Game.I.SnapshotCount,
                                           Game.I == null ? "-" : "" + Game.I.タイル接近_敵描画_Points.Count,
                                           "会ス" + (Ground.I.会話スキップ抑止 ? "抑" : "可"),

                                           Game.I == null ? "-" : "" + Game.I.行き先案内_Crashed_Start方面,
                                           Game.I == null ? "-" : "" + Game.I.行き先案内_Crashed_Goal方面,

                                           Game.I == null ? "-" : "" + Game.I.Player.X.ToString("F1"),
                                           Game.I == null ? "-" : "" + Game.I.Player.Y.ToString("F1"),

                                           // デバッグ表示する情報をここへ追加..

                                           DDEngine.FrameProcessingMillis,
                                           DDEngine.FrameProcessingMillis_Worst
                                           ));

                    DDPrint.Reset();
                };
            }

            if (ProcMain.DEBUG)
            {
                Main4_Debug();
            }
            else
            {
                Main4_Release();
            }
        }
コード例 #2
0
        public override void DrawWall(double cam_x, double cam_y, double cam_xRate, double cam_yRate)
        {
            DDDraw.SetBright(new I3Color(0, 0, 20));
            DDDraw.DrawRect(Ground.I.Picture.WhiteBox, 0, 0, DDConsts.Screen_W, DDConsts.Screen_H);
            DDDraw.Reset();

            if (DDEngine.ProcFrame % 90 == 0)
            {
                波紋効果.Addマップ下部から炎();
            }

            DDGround.EL.Add(() =>
            {
                double map_b = Game.I.Map.H * GameConsts.TILE_H;
                double cam_b = DDGround.Camera.Y + DDConsts.Screen_H;

                double y = map_b - cam_b;
                y       *= 0.5;
                y        = DDConsts.Screen_H - Ground.I.Picture.WallFire.Get_H() + y;

                DDDraw.SetBright(new I3Color(255, 0, 0));
                DDDraw.DrawSimple(Ground.I.Picture.WallFire, 0, y);
                DDDraw.Reset();

                if (DDEngine.ProcFrame % 20 == 0)
                {
                    double yy = map_b - cam_b;
                    yy       /= 2000.0;
                    yy        = 1.0 - yy;
                    DDUtils.ToRange(ref yy, 0.0, 1.0);
                    yy = 0.3 + yy * 0.7;

                    // yy == 0.3 ~ 1.0 == 高い位置 ~ 低い位置

                    if (DDConfig.LOG_ENABLED)
                    {
                        DDGround.EL.Keep(10, () =>
                        {
                            DDPrint.SetPrint(0, 16);
                            DDPrint.DebugPrint("yy: " + yy);
                        });
                    }
                    DDMusicUtils.Fade(10, yy);
                }
                return(false);
            });
        }
コード例 #3
0
        public static void DrawTiles()
        {
            int cam_l = DDGround.ICamera.X;
            int cam_t = DDGround.ICamera.Y;
            int cam_r = cam_l + DDConsts.Screen_W;
            int cam_b = cam_t + DDConsts.Screen_H;

            I2Point lt = GameCommon.ToTablePoint(cam_l, cam_t);
            I2Point rb = GameCommon.ToTablePoint(cam_r, cam_b);

            for (int x = lt.X; x <= rb.X; x++)
            {
                for (int y = lt.Y; y <= rb.Y; y++)
                {
                    MapCell cell  = Game.I.Map.GetCell(x, y);
                    I3Color color = new I3Color(0, 0, 0);
                    string  name  = "";

                    switch (cell.Kind)
                    {
                    case MapCell.Kind_e.EMPTY:
                        goto endDraw;

                    case MapCell.Kind_e.START:
                        color = new I3Color(0, 255, 0);
                        break;

                    case MapCell.Kind_e.GOAL:
                        color = new I3Color(0, 255, 255);
                        break;

                    case MapCell.Kind_e.WALL:
                        color = new I3Color(255, 255, 0);
                        break;

                    case MapCell.Kind_e.WALL_ENEMY_THROUGH:
                        color = new I3Color(255, 255, 0);
                        name  = "E通";
                        break;

                    case MapCell.Kind_e.DEATH:
                        color = new I3Color(255, 0, 0);
                        break;

                    default:
                        color = new I3Color(128, 128, 255);
                        name  = MapCell.Kine_e_Names[(int)cell.Kind];

                        if (name.Contains(':'))
                        {
                            name = name.Substring(0, name.IndexOf(':'));
                        }

                        if (name.Contains('/'))
                        {
                            name = name.Substring(name.IndexOf('/') + 1);
                        }

                        break;
                    }

                    {
                        int tileL = x * GameConsts.TILE_W;
                        int tileT = y * GameConsts.TILE_H;

                        DDDraw.SetBright(color);
                        DDDraw.DrawRect(
                            Ground.I.Picture.WhiteBox,
                            tileL - cam_l,
                            tileT - cam_t,
                            GameConsts.TILE_W,
                            GameConsts.TILE_H
                            );
                        DDDraw.Reset();

                        DDDraw.SetAlpha(0.1);
                        DDDraw.SetBright(new I3Color(0, 0, 0));
                        DDDraw.DrawRect(
                            Ground.I.Picture.WhiteBox,
                            tileL - cam_l,
                            tileT - cam_t,
                            GameConsts.TILE_W,
                            GameConsts.TILE_H / 2
                            );
                        DDDraw.Reset();

                        DDDraw.SetAlpha(0.2);
                        DDDraw.SetBright(new I3Color(0, 0, 0));
                        DDDraw.DrawRect(
                            Ground.I.Picture.WhiteBox,
                            tileL - cam_l,
                            tileT - cam_t,
                            GameConsts.TILE_W / 2,
                            GameConsts.TILE_H
                            );
                        DDDraw.Reset();

                        DDGround.EL.Add(() =>
                        {
                            DDPrint.SetBorder(new I3Color(0, 64, 64));
                            DDPrint.SetPrint(tileL - cam_l, tileT - cam_t);
                            DDPrint.DebugPrint(name);
                            DDPrint.Reset();

                            return(false);
                        });
                    }

endDraw:
                    ;
                }
            }
        }
コード例 #4
0
        private void Main4()
        {
            // *.INIT
            {
                // アプリ固有 >

                波紋効果.INIT();

                // < アプリ固有
            }

            #region Charge To DDTouch

            // DDCCResource 等のための Touch
            //DDTouch.Add(TitleMenu.TouchWallDrawerResources);

            // 個別に設定
            //DDTouch.Add(Ground.I.Picture.XXX);
            //DDTouch.Add(Ground.I.Music.XXX);
            //DDTouch.Add(Ground.I.SE.XXX);

            // 全部設定
            DDTouch.AddAllPicture();
            DDTouch.AddAllMusic();
            DDTouch.AddAllSE();

            #endregion

            //DDTouch.Touch(); // moved -> Logo

            if (DDConfig.LOG_ENABLED)
            {
                DDEngine.DispDebug = () =>
                {
                    DDPrint.SetPrint();
                    DDPrint.SetBorder(new I3Color(0, 0, 0));

                    DDPrint.DebugPrint(string.Join(
                                           " ",
                                           波紋効果.Count,
                                           Game.I == null ? "-" : "" + Game.I.SnapshotCount,
                                           Game.I == null ? "-" : "" + Game.I.タイル接近_敵描画_Points.Count,
                                           "会ス抑=" + (Ground.I.会話スキップ抑止 ? 1 : 0),

                                           Game.I == null ? "-" : "" + Game.I.行き先案内_Crashed_Start方面,
                                           Game.I == null ? "-" : "" + Game.I.行き先案内_Crashed_Goal方面,

                                           // デバッグ表示する情報をここへ追加..

                                           DDEngine.FrameProcessingMillis,
                                           DDEngine.FrameProcessingMillis_Worst
                                           ));

                    DDPrint.Reset();
                };
            }

            if (ProcMain.DEBUG)
            {
                Main4_Debug();
            }
            else
            {
                Main4_Release();
            }
        }