protected void ChangeModule() { if (m_NextModule != NULLMODULEID) { e_ChangeType = CHANGE_TYPE.PREPARE; } }
// Update is called once per frame void Update() { if (m_CurrentModule != null) { m_CurrentModule.DoRun(); } if (e_ChangeType != CHANGE_TYPE.NONE) { if (e_ChangeType == CHANGE_TYPE.PREPARE) { if (m_StartChangeModuleCallBack != null) { m_StartChangeModuleCallBack(); m_StartChangeModuleCallBack = null; } e_ChangeType = CHANGE_TYPE.CHANGE; } else if (e_ChangeType == CHANGE_TYPE.CHANGE) { if (m_NextModule != NULLMODULEID) { StartChangeModule(m_NextModule); m_NextModule = NULLMODULEID; e_ChangeType = CHANGE_TYPE.NONE; } } } }
public DicChangeBase GetChangeData() { DicChange <T> changeData = new DicChange <T>(); changeData.name = name; changeData.index = new int[indexList.Count]; changeData.type = new CHANGE_TYPE[indexList.Count]; changeData.data = new T[indexList.Count]; for (int i = 0; i < indexList.Count; i++) { int index = indexList[i]; changeData.index[i] = index; CHANGE_TYPE type = typeList[i]; changeData.type[i] = type; if (type != CHANGE_TYPE.REMOVE) { changeData.data[i] = this[index]; } } indexList.Clear(); typeList.Clear(); return(changeData); }