FSM RegistFSM(FSM_LAYER_ID layer, FSM_ID id) { FSM tFSM = FileManager.Inst.ResourceLoad("FSMData/" + id.ToString()) as FSM; if (tFSM == null) { Debug.LogWarning("No FSM Data " + id.ToString()); return(null); } tFSM.InitNonSerializedField(); FSM_Layer.Inst.AddFSM(layer, tFSM, id); return(tFSM); }
private static StatePopupList MakePopupArray(FSM_ID fsmid) { string prefix = fsmid.ToString(); string ts; string[] split; List <string> tArr_Name = new List <string>(); List <int> tArr_ID = new List <int>(); for (int i = 0; i < arr_sStateID.Length; i++) { ts = arr_sStateID.GetValue(i).ToString(); split = ts.Split('_'); if (split[0] == prefix) { tArr_Name.Add(ts); tArr_ID.Add((int)arr_sStateID.GetValue(i)); } } tArr_Name.Add(STATE_ID.HistoryBack.ToString()); tArr_ID.Add((int)STATE_ID.HistoryBack); StatePopupList result = new StatePopupList(); result.arr_sName = tArr_Name.ToArray() as string[]; result.arr_nID = tArr_ID.ToArray(); return(result); }
public State GetState(FSM_LAYER_ID eLayer, FSM_ID fsmID, STATE_ID stateID) { layerNum = (int)eLayer; if (dicFSM_EachLayer == null) { return(null); } if (dicFSM_EachLayer[layerNum] == null) { UDL.LogError("지정한 레이어에 FSM이 지정되 있지 않음 ", nLogOption, errorLoglv); return(null); } if (!dicFSM_EachLayer[layerNum].TryGetValue(fsmID, out tFSMBuffer)) { UDL.LogError(fsmID.ToString() + " FSM 이 등록되어 있지 않음", nLogOption, errorLoglv); return(null); } return(tFSMBuffer.GetState(stateID)); }
void SaveFSM() { FileManager.Inst.FileSave(fsmFilePath, curFSMID.ToString() + ".bytes", curFSM); }