public Jueseshuxing Shuxin; public void Xuanze1_Button() { Button1.SetActive(false); Button2.SetActive(false); Button3.SetActive(false); anniu = 1; Duihua(AA); } public void Xuanze2_Button() { Button1.SetActive(false); Button2.SetActive(false); Button3.SetActive(false); anniu = 2; Duihua(AA); } public void Xuanze3_Button() { Button1.SetActive(false); Button2.SetActive(false); Button3.SetActive(false); anniu = 3; Duihua(AA); } public void Continue_Button() { Duihua(AA); } void duihua(int aa) { if (aa == 0) switch (n) { case 0: Duihuakuang.text = "【序幕】"; n++; break; case 1: Duihuakuang.text = "【漆黑的空间】\n【像是坠入了深渊般虚无与空洞......浓浓的窒息感】"; n++; break; case 2: Duihuakuang.text = "【脑海中不断地响起....阵阵刺耳的声鸣。】"; n++; break; case 3: Duihuakuang.text = "【α:滋....¥!@#%#!¥?滋%.....】"; n++; break; case 4: Duihuakuang.text = "【α:...你...醒了吗?】"; Button1_text.text = "【嗯.】"; Button2_text.text = "【......】"; Button3_text.text = "【你是谁?】" Button1.SetActive(true); Button2.SetActive(true); Button3.SetActive(true); Buttonjixu.SetActive(false); n++; break; default: if (anniu == 1) { Duihuakuang.text = "【α:呵呵,我还以为你会选择沉默~】"; AA = 1; } if (anniu == 2) { Duihuakuang.text = "【α:...这样呀~】"; AA = 2; } if (anniu == 3) { Duihuakuang.text = "【α:我是...呵,你不必知道.】"; AA = 3; } n = 0; break; } }
时间: 2024-02-10 12:13:53 浏览: 70
gcc-linaro-7.3.1-2018.05-x86-64-aarch64-linux-gnu.tar
您提供的代码存在一些语法错误,可能是因为缺少一些分号或者括号不匹配。下面是修改后的代码:
```
public Jueseshuxing Shuxin;
public void Xuanze1_Button()
{
Button1.SetActive(false);
Button2.SetActive(false);
Button3.SetActive(false);
anniu = 1;
Duihua(AA);
}
public void Xuanze2_Button()
{
Button1.SetActive(false);
Button2.SetActive(false);
Button3.SetActive(false);
anniu = 2;
Duihua(AA);
}
public void Xuanze3_Button()
{
Button1.SetActive(false);
Button2.SetActive(false);
Button3.SetActive(false);
anniu = 3;
Duihua(AA);
}
public void Continue_Button()
{
Duihua(AA);
}
void duihua(int aa)
{
if (aa == 0)
switch (n)
{
case 0:
Duihuakuang.text = "【序幕】";
n++;
break;
case 1:
Duihuakuang.text = "【漆黑的空间】\n【像是坠入了深渊般虚无与空洞......浓浓的窒息感】";
n++;
break;
case 2:
Duihuakuang.text = "【脑海中不断地响起....阵阵刺耳的声鸣。】";
n++;
break;
case 3:
Duihuakuang.text = "【α:滋....¥!@#%#!¥?滋%.....】";
n++;
break;
case 4:
Duihuakuang.text = "【α:...你...醒了吗?】";
Button1_text.text = "【嗯.】";
Button2_text.text = "【......】";
Button3_text.text = "【你是谁?】";
Button1.SetActive(true);
Button2.SetActive(true);
Button3.SetActive(true);
Buttonjixu.SetActive(false);
n++;
break;
default:
if (anniu == 1)
{
Duihuakuang.text = "【α:呵呵,我还以为你会选择沉默~】";
AA = 1;
}
if (anniu == 2)
{
Duihuakuang.text = "【α:...这样呀~】";
AA = 2;
}
if (anniu == 3)
{
Duihuakuang.text = "【α:我是...呵,你不必知道.】";
AA = 3;
}
n = 0;
break;
}
}
```
请注意,我只是修改了语法错误,但是代码的逻辑仍然需要您自己检查和修改。
阅读全文