//制限時間 private void timer1_Tick(object sender, EventArgs e) { SwimFish(); if (count > 0) { count--; labelTime.Text = $"残り時間:{count/10}秒"; } if (count == 0) { timer1.Stop(); if (score != 0) { labelTime.Text = "ゲーム終了"; } } //昼と夜 if (count <= 500 && 450 <= count || count <= 350 && 300 <= count || count <= 200 && 150 <= count || 0 < count && count <= 50) { this.BackColor = Color.Navy; utubo.Sleep(); iwasi.Sleep(); } else { this.BackColor = Color.DeepSkyBlue; utubo.Wake(); iwasi.Wake(); } }