using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class player : MonoBehaviour
{
public int easyLevel =0;
public int mediumLevel =1;
public int hardLevel =2;// 3 个不同等级难度
public int chooseLevel;// 用于存储选择的难度// Start is called before the first frame updatevoidStart(){// 在 unity中选择一个难度if(chooseLevel == easyLevel)// 判断选择了简单模式{
Debug.Log("Easy level is runing!");// 弹出提示:简单模式正在运行}elseif(chooseLevel == mediumLevel)// 第2层判断{
Debug.Log("Medium level is runing");}elseif(chooseLevel == hardLevel)// 第3层判断{
Debug.Log("Hard level is runing!");}else{
Debug.Log("You choose wrong level!");// 选择错误弹出提示}}// Update is called once per framevoidUpdate(){}}