81 lines
2.5 KiB
C#
81 lines
2.5 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using CG.Framework;
|
|
using CG.UTility;
|
|
using System;
|
|
/********************************************************************************
|
|
*Create By CG
|
|
*Function
|
|
*********************************************************************************/
|
|
namespace ZXK.GYJQR
|
|
{
|
|
public class GameManager : MonoSingleton<GameManager>
|
|
{
|
|
[MyReadOnly]//当前程序正在进行的系统类型
|
|
public EnumCtrl.SystemType _CurSystemType = EnumCtrl.SystemType.None;
|
|
//判定是否是第一次进入系统
|
|
public List<EnumCtrl.SystemType> _EnteredTrainSceneArray = new List<EnumCtrl.SystemType>();
|
|
|
|
private string _studentName;
|
|
private string _studentNumber;
|
|
public string _StudentName { get=>_studentName;}
|
|
public string _StudentNumber { get => _studentNumber; }
|
|
|
|
public DataAZBSHandler _DataAZBSHandler = null;
|
|
public DataBJCJHandler _DataBJCJHandler = null;
|
|
|
|
public readonly StateContext _StateContext = new StateContext();
|
|
|
|
//当前app声音
|
|
[System.NonSerialized]
|
|
public float _CurAppVoice = 0.5f;
|
|
//当前app鼠标灵敏度
|
|
[System.NonSerialized]
|
|
public float _CurMouseFlexible = 50.0f;
|
|
|
|
protected override void AwakeSelf()
|
|
{
|
|
base.AwakeSelf();
|
|
_DataAZBSHandler = new DataAZBSHandler();
|
|
_DataBJCJHandler = new DataBJCJHandler();
|
|
_StateContext.SetState(new LoginState(_StateContext));
|
|
}
|
|
private void Update()
|
|
{
|
|
|
|
if (Input.GetKeyDown(KeyCode.Escape))
|
|
{
|
|
UtilitiesMng.CustomQuit();
|
|
}
|
|
|
|
}
|
|
public void SetStudentInfo(string name, string number)
|
|
{
|
|
_studentName = name;
|
|
_studentNumber = number;
|
|
}
|
|
public void ChangeType(EnumCtrl.SystemType type)
|
|
{
|
|
_CurSystemType = type;
|
|
switch (_CurSystemType)
|
|
{
|
|
case EnumCtrl.SystemType.None:
|
|
break;
|
|
case EnumCtrl.SystemType.AZBS:
|
|
break;
|
|
case EnumCtrl.SystemType.BJCZ:
|
|
break;
|
|
case EnumCtrl.SystemType.BY:
|
|
break;
|
|
case EnumCtrl.SystemType.SJFJ:
|
|
break;
|
|
case EnumCtrl.SystemType.HJ:
|
|
break;
|
|
case EnumCtrl.SystemType.PT:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|