贪吃蛇小项目

This commit is contained in:
2025-09-21 20:11:21 +08:00
parent 0a1446e7b3
commit 116b65164b
18 changed files with 695 additions and 25 deletions
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace
{
class BeginScene : BaseScene
{
public BeginScene()
{
title = "贪吃蛇小游戏";
str1 = "开始游戏";
}
public override void PressEnter()
{
//根据nowSceneIndex的值决定按下回车后做什么
if( nowSceneIndex == 0 )
{
//切换到开始游戏
Game.ChangeScene(E_Scene.Game);
}
else
{
//结束游戏
Environment.Exit(0);
}
}
}
}