テトリスを作っています。
画面が白い画面のままゲーム」がスタートしません
初期化と配列要素はブレークポイントで確認したら成功しました。
サブスレッドは使っていません。tm_tickのtm.Intervalの値は200です。FormClosedとFormClosingイベントは空です。
using System; using System.Windows.Forms; using System.Drawing; using System.Linq; using System.Collections; class Sample1 : Form { private static Image WK; private static int[] fm; private static Image[] im; private static Label[][] gb, fCommunicator, fUU,fon; private static Label[] fcan, fwill; private static Label fUI, fIU, fgetout,fWW; private static Label[][] fMM; private static string[][] STR; private static int LEVEL, ICHI, WW,ki,kill, LJ, JL, LL, PAI, PAI2, KK, chang, with; private static int[] pripade = new int[17]; private static int getout = 1; private static PictureBox[] lbx = new PictureBox[5]; private static int UI, IU; private static int[] rint, pp, saikoro, rotation, will, shall, can; private static int[][] GPS, UU, Communicator, Coordinate, on, elevater; private static int[][][] MM; private static bool Reuse; public static void Main() { this.Text = "サンプル"; this.DoubleBuffered = true; this.Width = 600; this.Height = 1000; this.StartPosition = FormStartPosition.Manual; this.Location = new Point(800, 0);
が初期設定です。
コードfm = new int[7]; im = new Image[8]; will = new int[8]; shall = new int[2]; rint = new int[2]; fcan = new Label[18]; fwill = new Label[7]; can = new int[18]; pp = new int[30 + getout]; saikoro = new int[30]; rotation = new int[30]; gb = new Label[12][]; MM = new int[8][][]; fMM = new Label[8][]; Communicator = new int[12][]; UU = new int[12][]; GPS = new int[12][]; STR = new string[12][]; elevater = new int[12][]; Coordinate = new int[12][]; fCommunicator = new Label[12][]; fUU = new Label[12][]; on = new int[12][]; fon = new Label[12][]; for (int t = 0; t <= 11; t++) { Coordinate[t] = new int[19]; Communicator[t] = new int[19]; UU[t] = new int[19]; GPS[t] = new int[19]; STR[t] = new string[18]; gb[t] = new Label[18]; elevater[t] = new int[18]; fCommunicator[t] = new Label[18]; fUU[t] = new Label[19]; on[t] = new int[18]; fon[t] = new Label[18]; } for (int pm3 = 0; pm3 <= 7; pm3++) { MM[pm3] = new int[7][]; fMM[pm3] = new Label[7]; for (int pm4 = 0; pm4 <= 6; pm4++) { MM[pm3][pm4] = new int[30]; } }
が配列の要素数です。
回答2件
あなたの回答
tips
プレビュー