public static void AfterSimulation(TextMeshPro tm) { ++handlerCallBack; if (handlerCallBack == handlers.Count) { SaveLoadTool.SaveGame("Sim_"); List <GameObject> tempGos = new List <GameObject>(); foreach (GameObject go in GlobalReferences.FrozenParts.Values) { tempGos.Add(go); } GlobalReferences.FrozenParts.Clear(); ChangeColliders(true); for (int i = tempGos.Count - 1; i >= 0; --i) { Destroy(tempGos[i]); } AssemblyIO.Load(tempPath); GlobalReferences.RebuildIndices(); tm.text = "Run\nSimulation"; tm.faceColor = GlobalReferences.UnaffectedColor; simulationInProgress = false; handlers.Clear(); handlerCallBack = 0; } }
//MonoBehaviour methods #region void Start() { activeFont = Resources.Load <Material>("Materials/Toolset/Toolset_Font"); inactiveFont = Resources.Load <Material>("Materials/Toolset/Toolset_Font_Inactive"); NumberOfParts = txtNumParts.gameObject.GetComponent <NumberOfPartsTool>(); PartType = txtPartType.gameObject.GetComponent <PartTypeTool>(); RuleFilter = txtRuleFilter.gameObject.GetComponent <RuleFilterTool>(); PlacementType = txtPlaceType.gameObject.GetComponent <PlacementTypeTool>(); SaveLoad = txtSaveLoad.gameObject.GetComponent <SaveLoadTool>(); SimulateStatics = txtSimStat.gameObject.GetComponent <SimStaticsTool>(); }
/// <summary> /// 基本信息UI显示 /// </summary> private void SetCardInfo() { //[基本信息]设置学生证 string xing = DataManager.GetInstance().gameData.heroXing; string ming = DataManager.GetInstance().gameData.heroMing; namelb.text = xing + ming; wenlb.text = player.GetBasicStatus("文科").ToString(); lilb.text = player.GetBasicStatus("理科").ToString(); tilb.text = player.GetBasicStatus("体育").ToString(); yilb.text = player.GetBasicStatus("艺术").ToString(); zhailb.text = player.GetBasicStatus("宅力").ToString(); energylb.text = player.energyPoint.ToString(); ranklb1.text = ChineseRank(player.GetBasicStatus("排名")); moneylb.text = player.GetBasicStatus("金钱").ToString(); //statuslb.text = ChineseStatus(player.GetBasicStatus("体力")); lengb.value = player.GetLogicStatus("冷静") / 10f; koub.value = player.GetLogicStatus("口才") / 10f; sib.value = player.GetLogicStatus("思维") / 10f; guanb.value = player.GetLogicStatus("观察") / 10f; seedlb.text = SaveLoadTool.GetKey(); //TODO 网络统计部分 }