public Form1() { this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; // 시작위치 중앙 InitializeComponent(); /* * //아두이노 보드가 연결된 포트의 이름 * arduSerialPort.PortName = "COM3"; // 포트이름이 바꼈다면 수정 요망~! * //아두이노 보드 통신 속도 * arduSerialPort.BaudRate = 9600; * //지정한 포트 열기 * arduSerialPort.Open(); */ /* * arduSerialPort.Write("3"); // 다리 올려준다! * arduSerialPort.Write("0");//발끝 스트레칭! * arduSerialPort.Write("1");//발끝 스트레칭 끝! * arduSerialPort.Write("2");//다리 스트레칭 끝! */ Back.Hide(); // 선택화면 - 뒤로가기 버튼 Confirm.Hide(); // 선택화면 - 확인 M_Box.Hide(); // 선택화면 - 분 Select_Beginner.Hide(); // 선택화면 - 초보자 버튼 Select_Master.Hide(); // 선택화면 - 숙련자 버튼 pictureBox2.Hide(); // 선택화면 - 배경 pictureBox3.Hide(); pictureBox4.Hide(); }
public Fort(int hardnes, string ski, string skinbery) { InitializeComponent(); youLose.Parent = Monitor; youLose.BackColor = Color.FromArgb(50, 0, 0, 0); youLose.Hide(); youLose.Width = this.Width; youLose.Height = this.Height; Skin = ski; SkinBerry = skinbery; youLoseText.Parent = youLose; youLoseText.BackColor = Color.Transparent; youLoseText.Hide(); ScoreWas.Parent = youLose; ScoreWas.BackColor = Color.Transparent; ScoreWas.Hide(); Back.Hide(); button1.Hide(); Score.Parent = Monitor; Score.BackColor = Color.Transparent; hardness = hardnes; snake = new AnySnake(); Berry = new Strawberry(); Berry.texture = new Bitmap("img/Berries/" + SkinBerry + "Berry.png"); snake.ChangeSkin(Skin); bi = new Bitmap(Monitor.Width, Monitor.Height); KeyPreview = true; background = new Bitmap("img/Background.jpg"); SnakeTail = new Bitmap("img/" + snake.Skin + "/SnakeTailL.png"); timer1.Enabled = true; timer2.Enabled = true; timer1.Interval = 100; timer2.Interval = 1; timer2.Start(); gamestarted = true; if (hardness == 1) { timer1.Interval = 100; hardmode = false; } if (hardness == 2) { timer1.Interval = 50; hardmode = false; } if (hardness == 3) { timer1.Interval = 50; hardmode = true; } }
//선택화면에서 뒤로 private void Back_Click(object sender, EventArgs e) { M_Box.Hide(); Confirm.Hide(); Select_Master.Hide(); Select_Beginner.Hide(); Back.Hide(); pictureBox2.Hide(); pictureBox3.Hide(); pictureBox4.Hide(); pictureBox1.Show(); Main_Start.Show(); Main_Manual.Show(); Main_Exit.Show(); }
private void button1_Click(object sender, EventArgs e) { timer1.Enabled = true; timer2.Enabled = true; timer2.Start(); snake = new AnySnake(); Berry = new Strawberry(); Berry.texture = new Bitmap("img/Berries/" + SkinBerry + "Berry.png"); snake.ChangeSkin(Skin); youLose.Hide(); youLoseText.Hide(); button1.Hide(); ScoreWas.Hide(); Back.Hide(); count = 0; Score.Text = count.ToString(); gamestarted = true; }
private void BackToMenu() { HumanVsComputer.Show(); HumanVsHuman.Show(); Credits.Show(); Settings.Show(); Back.Hide(); if (!CreditsLBL.IsDisposed) { CreditsLBL.Hide(); } if (!OnePlayerNameTXT.IsDisposed) { OnePlayerNameTXT.Hide(); TwoPlayerNameTXT.Hide(); Save.Hide(); if (!Save.Enabled) { Save.Enabled = true; Save.Text = "Save"; } } }