// Start is called before the first frame update void Start() { mSceneModule = NFRoot.Instance().GetPluginManager().FindModule <NFSceneModule>(); GameObject xModelObject = mSceneModule.GetModelObject(); ModelInput = xModelObject.GetComponent <NFModelInput>(); }
public NFFallState(GameObject gameObject, NFAnimaStateType eState, NFAnimaStateMachine xStateMachine, float fHeartBeatTime, float fExitTime, bool input = false) : base(gameObject, eState, xStateMachine, fHeartBeatTime, fExitTime, input) { xHeroMotor = gameObject.GetComponent <NFHeroMotor>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mSceneModule = NFRoot.Instance().GetPluginManager().FindModule <NFSceneModule>(); }
public override void Init() { NFRoot.Instance().mbShowCMDGUI = true; toggleLowQuanlity.onValueChanged.AddListener(delegate(bool isOn) { this.OnQuanlityValueChanged(isOn, toggleLowQuanlity); }); toggleMidQuanlity.onValueChanged.AddListener(delegate(bool isOn) { this.OnQuanlityValueChanged(isOn, toggleMidQuanlity); }); toggleHighQuanlity.onValueChanged.AddListener(delegate(bool isOn) { this.OnQuanlityValueChanged(isOn, toggleHighQuanlity); }); toggleCHINEASE.onValueChanged.AddListener(delegate(bool isOn) { mLanguageModule.SetLocalLanguage(NFrame.Language.Chinese); }); toggleENGLISH.onValueChanged.AddListener(delegate(bool isOn) { mLanguageModule.SetLocalLanguage(NFrame.Language.English); }); toggleFRENCH.onValueChanged.AddListener(delegate(bool isOn) { mLanguageModule.SetLocalLanguage(NFrame.Language.French); }); toggleSPANISH.onValueChanged.AddListener(delegate(bool isOn) { mLanguageModule.SetLocalLanguage(NFrame.Language.Spanish); }); exitButton.onClick.AddListener(OnExitBtnClick); }
// Use this for initialization private void Awake() { mkernelModule = NFRoot.Instance().GetPluginManager().FindModule <NFIKernelModule>(); mClassModule = NFRoot.Instance().GetPluginManager().FindModule <NFIClassModule>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mElementModule = NFRoot.Instance().GetPluginManager().FindModule <NFIElementModule>(); }
// Use this for initialization private void Awake() { mkernelModule = NFRoot.Instance().GetPluginManager().FindModule <NFIKernelModule>(); mClassModule = NFRoot.Instance().GetPluginManager().FindModule <NFIClassModule>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mElementModule = NFRoot.Instance().GetPluginManager().FindModule <NFIElementModule>(); int iNum = 0; Transform tParent = this.transform.parent; while (tParent) { rowView = tParent.GetComponent <NFRecordRowView> (); if (rowView != null) { rowView.AddColView(col, this); break; } iNum++; if (iNum > 3) { break; } tParent = tParent.parent; } }
public NFIdleState(GameObject gameObject, NFAnimaStateType eState, NFAnimaStateMachine xStateMachine, float fHeartBeatTime, float fExitTime, bool input = false) : base(gameObject, eState, xStateMachine, fHeartBeatTime, fExitTime, input) { NFIPluginManager pluginManager = NFRoot.Instance().GetPluginManager(); mKernelModule = pluginManager.FindModule <NFIKernelModule>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mSceneModule = NFRoot.Instance().GetPluginManager().FindModule <NFSceneModule>(); }
private void Awake() { NFIPluginManager xPluginManager = NFRoot.Instance().GetPluginManager(); mLoginModule = xPluginManager.FindModule <NFLoginModule>(); mUIModule = xPluginManager.FindModule <NFUIModule>(); mEventModule = xPluginManager.FindModule <NFIEventModule>(); mLanguageModule = xPluginManager.FindModule <NFLanguageModule>(); }
// Start is called before the first frame update void Start() { mVertices = new List <Vector3>(); mUvs = new List <Vector2>(); mTriangles = new List <int>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mMainCamera = GameObject.Find("Main Camera"); mParts = new List <GameObject>(); }
private void Start() { mxSyncBuffer = GetComponent <NFModelSyncBuffer>(); mNetModule = NFRoot.Instance().GetPluginManager().FindModule <NFNetModule>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mHelpModule = NFRoot.Instance().GetPluginManager().FindModule <NFHelpModule>(); mKernelModule = NFRoot.Instance().GetPluginManager().FindModule <NFIKernelModule>(); mMainCamera = GameObject.Find("Main Camera"); }
private void Awake() { NFIPluginManager xPluginManager = NFRoot.Instance().GetPluginManager(); mLoginModule = xPluginManager.FindModule <NFLoginModule>(); mUIModule = xPluginManager.FindModule <NFUIModule>(); mNetModule = xPluginManager.FindModule <NFNetModule>(); mHelpModule = xPluginManager.FindModule <NFHelpModule>(); mSceneModule = xPluginManager.FindModule <NFSceneModule>(); }
private void Start() { mxHeroMotor = GetComponent <NFHeroMotor>(); mxSyncBuffer = GetComponent <NFHeroSyncBuffer>(); mxBodyIdent = GetComponent <NFBodyIdent>(); mAnimaStateMachine = GetComponent <NFAnimaStateMachine>(); mAnimatStateController = GetComponent <NFAnimatStateController>(); mxNetModule = NFRoot.Instance().GetPluginManager().FindModule <NFNetModule>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mHelpModule = NFRoot.Instance().GetPluginManager().FindModule <NFHelpModule>(); }
private void Awake() { NFIPluginManager xPluginManager = NFRoot.Instance().GetPluginManager(); mNetModule = xPluginManager.FindModule <NFNetModule>(); mLoginModule = xPluginManager.FindModule <NFLoginModule>(); mUIModule = xPluginManager.FindModule <NFUIModule>(); mEventModule = xPluginManager.FindModule <NFIEventModule>(); mKernelModule = NFRoot.Instance().GetPluginManager().FindModule <NFIKernelModule>(); mElementModule = NFRoot.Instance().GetPluginManager().FindModule <NFIElementModule>(); }
// Use this for initialization public override void Init() { mEventModule = NFRoot.Instance().GetPluginManager().FindModule <NFIEventModule>(); mNetModule = NFRoot.Instance().GetPluginManager().FindModule <NFNetModule>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mUIModule = NFRoot.Instance().GetPluginManager().FindModule <NFUIModule>(); mHelpModule = NFRoot.Instance().GetPluginManager().FindModule <NFHelpModule>(); mAcceptButton.onClick.AddListener(OnAcceptClick); mRejectButton.onClick.AddListener(OnRejectClick); }
void Start() { mUIModule = NFRoot.Instance().GetPluginManager().FindModule <NFUIModule>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mNetModule = NFRoot.Instance().GetPluginManager().FindModule <NFNetModule>(); mSceneModule = NFRoot.Instance().GetPluginManager().FindModule <NFSceneModule>(); mKernelModule = NFRoot.Instance().GetPluginManager().FindModule <NFIKernelModule>(); mMainCamera = GameObject.Find("Main Camera"); GetModelInfoList(); // mSceneModule.SetCurrentModel(-1); }
// Use this for initialization public override void Init() { mEventModule = NFRoot.Instance().GetPluginManager().FindModule <NFIEventModule>(); mNetModule = NFRoot.Instance().GetPluginManager().FindModule <NFNetModule>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mUIModule = NFRoot.Instance().GetPluginManager().FindModule <NFUIModule>(); mHelpModule = NFRoot.Instance().GetPluginManager().FindModule <NFHelpModule>(); mLogin.onClick.AddListener(OnLoginClick); mEventModule.RegisterCallback((int)NFLoginModule.Event.LoginSuccess, OnLoginSuccess); }
private void Awake() { mEventModule = NFRoot.Instance().GetPluginManager().FindModule <NFIEventModule>(); mKernelModule = NFRoot.Instance().GetPluginManager().FindModule <NFIKernelModule>(); mElementModule = NFRoot.Instance().GetPluginManager().FindModule <NFIElementModule>(); mClassModule = NFRoot.Instance().GetPluginManager().FindModule <NFIClassModule>(); mSceneModule = NFRoot.Instance().GetPluginManager().FindModule <NFSceneModule>(); mLanguageModule = NFRoot.Instance().GetPluginManager().FindModule <NFLanguageModule>(); mNetModule = NFRoot.Instance().GetPluginManager().FindModule <NFNetModule>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mUIModule = NFRoot.Instance().GetPluginManager().FindModule <NFUIModule>(); mHelpModule = NFRoot.Instance().GetPluginManager().FindModule <NFHelpModule>(); }
//=================================================================================================================o public override void Awake() { base.Awake(); _walkSpeed = 1.5f; angularSpeed = 0f; mKernelModule = NFRoot.Instance().GetPluginManager().FindModule <NFIKernelModule>(); mSceneModule = NFRoot.Instance().GetPluginManager().FindModule <NFSceneModule>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mNetModule = NFRoot.Instance().GetPluginManager().FindModule <NFNetModule>(); mUIModule = NFRoot.Instance().GetPluginManager().FindModule <NFUIModule>(); mAnima = GetComponent <NFAnimatStateController>(); }
void Start() { mStateMachineMng = GetComponent <NFAnimaStateMachine>(); mBodyIdent = GetComponent <NFBodyIdent>(); mHeroMotor = GetComponent <NFHeroMotor>(); mUIModule = NFRoot.Instance().GetPluginManager().FindModule <NFUIModule>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mKernelModule = NFRoot.Instance().GetPluginManager().FindModule <NFIKernelModule>(); mKernelModule.RegisterPropertyCallback(mBodyIdent.GetObjectID(), NFrame.Player.MOVE_SPEED, PropertyMoveSpeedHandler); mKernelModule.RegisterPropertyCallback(mBodyIdent.GetObjectID(), NFrame.Player.ATK_SPEED, PropertyAttackSpeedHandler); mHeroMotor.angularSpeed = 0f; }
public void Awake() { NFIPluginManager pluginManager = NFRoot.Instance().GetPluginManager(); xBodyIdent = GetComponent <NFBodyIdent>(); mKernelModule = pluginManager.FindModule <NFIKernelModule>(); mElementModule = pluginManager.FindModule <NFIElementModule>(); mLoginModule = pluginManager.FindModule <NFLoginModule>(); AddState(NFAnimaStateType.Idle, new NFIdleState(this.gameObject, NFAnimaStateType.Idle, this, 1f, 0f, true)); AddState(NFAnimaStateType.Idle1, new NFIdleState(this.gameObject, NFAnimaStateType.Idle, this, 1f, 0f, true)); AddState(NFAnimaStateType.Idle2, new NFIdleState(this.gameObject, NFAnimaStateType.Idle, this, 1f, 0f, true)); AddState(NFAnimaStateType.Run, new NFRunState(this.gameObject, NFAnimaStateType.Run, this, 1f, 0f, true)); AddState(NFAnimaStateType.Walk, new NFWalkState(this.gameObject, NFAnimaStateType.Walk, this, 1f, 0f, true)); AddState(NFAnimaStateType.Dizzy, new NFDizzyState(this.gameObject, NFAnimaStateType.Dizzy, this, 1f, 0f)); AddState(NFAnimaStateType.Freeze, new NFFreezeState(this.gameObject, NFAnimaStateType.Freeze, this, 1f, 0f)); AddState(NFAnimaStateType.Block, new NFBlockState(this.gameObject, NFAnimaStateType.Block, this, 1f, 0f)); AddState(NFAnimaStateType.Fall, new NFFallState(this.gameObject, NFAnimaStateType.Fall, this, 1f, 0f)); AddState(NFAnimaStateType.Dead, new NFDeadState(this.gameObject, NFAnimaStateType.Dead, this, 1f, 0f)); AddState(NFAnimaStateType.JumpStart, new NFJumpStartState(this.gameObject, NFAnimaStateType.JumpStart, this, 1f, 0f)); AddState(NFAnimaStateType.Jumping, new NFJumpingState(this.gameObject, NFAnimaStateType.Jumping, this, 1f, 0f)); AddState(NFAnimaStateType.JumpLand, new NFJumpLandState(this.gameObject, NFAnimaStateType.JumpLand, this, 0.1f, 0.4f)); AddState(NFAnimaStateType.BeHit1, new NFBeHitState(this.gameObject, NFAnimaStateType.BeHit1, this, 1f, 0f)); AddState(NFAnimaStateType.BeHit2, new NFBeHitState(this.gameObject, NFAnimaStateType.BeHit2, this, 1f, 0f)); AddState(NFAnimaStateType.HitFly, new NFHitFlyState(this.gameObject, NFAnimaStateType.HitFly, this, 1f, 0f)); AddState(NFAnimaStateType.Stun, new NFHitFlyState(this.gameObject, NFAnimaStateType.Stun, this, 1f, 0f)); AddState(NFAnimaStateType.DashForward, new NFDashForwardState(this.gameObject, NFAnimaStateType.DashForward, this, 1f, 0f)); AddState(NFAnimaStateType.DashJump, new NFDashForwardState(this.gameObject, NFAnimaStateType.DashJump, this, 1f, 0f)); AddState(NFAnimaStateType.Buff1, new NFBuff1(this.gameObject, NFAnimaStateType.Buff1, this, 1f, 0f)); AddState(NFAnimaStateType.NormalSkill1, new NFNormalSkill1(this.gameObject, NFAnimaStateType.NormalSkill1, this, 1f, 0f)); AddState(NFAnimaStateType.NormalSkill2, new NFNormalSkill2(this.gameObject, NFAnimaStateType.NormalSkill2, this, 1f, 0f)); AddState(NFAnimaStateType.NormalSkill3, new NFNormalSkill3(this.gameObject, NFAnimaStateType.NormalSkill3, this, 1f, 0f)); AddState(NFAnimaStateType.NormalSkill4, new NFNormalSkill4(this.gameObject, NFAnimaStateType.NormalSkill4, this, 1f, 0f)); AddState(NFAnimaStateType.NormalSkill5, new NFNormalSkill5(this.gameObject, NFAnimaStateType.NormalSkill5, this, 1f, 0f)); AddState(NFAnimaStateType.SpecialSkill1, new NFSpecialSkill1(this.gameObject, NFAnimaStateType.SpecialSkill1, this, 1f, 0f)); AddState(NFAnimaStateType.SpecialSkill2, new NFSpecialSkill2(this.gameObject, NFAnimaStateType.SpecialSkill2, this, 1f, 0f)); AddState(NFAnimaStateType.SkillThump, new NFSkillThump(this.gameObject, NFAnimaStateType.SkillThump, this, 1f, 0f)); }
public override void OnCheckInput(GameObject gameObject) { if (mStateMachine.IsMainRole()) { //hp if (mKernelModule.QueryPropertyInt(xBodyIdent.GetObjectID(), NFrame.NPC.HP) <= 0) { return; } if (NFRoot.Instance().GetGameMode() == GAME_MODE.GAME_MODE_2D) { bool left = false; bool right = false; bool top = false; if (xHeroMotor.GetMoveDrictor().z > 0) { top = true; } if (xHeroMotor.GetMoveDrictor().x < 0) { left = true; xHeroMotor.ProcessInput(left, right, top); if (top) { mAnimatStateController.PlayAnimaState(NFAnimaStateType.JumpStart, -1); } else { mAnimatStateController.PlayAnimaState(NFAnimaStateType.Run, -1); } } else if (xHeroMotor.GetMoveDrictor().x > 0) { right = true; xHeroMotor.ProcessInput(left, right, top); if (top) { mAnimatStateController.PlayAnimaState(NFAnimaStateType.JumpStart, -1); } else { mAnimatStateController.PlayAnimaState(NFAnimaStateType.Run, -1); } } else { if (top) { xHeroMotor.ProcessInput(left, right, top); mAnimatStateController.PlayAnimaState(NFAnimaStateType.JumpStart, -1); } } } else { if (xHeroMotor.GetMoveDrictor() != Vector3.zero) { } } } }
public void OnCMDChanged(bool ison, Toggle sender) { NFRoot.Instance().mbShowCMDGUI = ison; }
public override void Init() { NFIPluginManager xPluginManager = NFRoot.Instance().GetPluginManager(); mKernelModule = xPluginManager.FindModule <NFIKernelModule>(); }
public NFDeadState(GameObject gameObject, NFAnimaStateType eState, NFAnimaStateMachine xStateMachine, float fHeartBeatTime, float fExitTime, bool input = false) : base(gameObject, eState, xStateMachine, fHeartBeatTime, fExitTime, input) { mUIModule = NFRoot.Instance().GetPluginManager().FindModule <NFUIModule>(); }
void Awake() { mLanguageModule = NFRoot.Instance().GetPluginManager().FindModule <NFLanguageModule>(); mLanguageModule.AddLanguageUI(this.gameObject); }
public T ShowUI <T>(bool bCloseLastOne = true, bool bPushHistory = true, NFDataList varList = null) where T : NFUIDialog { /* * if (mCurrentDialog != null && bCloseLastOne) * { * Debug.Log("close ui " + mCurrentDialog.gameObject.name); * * mCurrentDialog.gameObject.SetActive(false); * mCurrentDialog = null; * } */ string name = typeof(T).ToString(); GameObject uiObject; if (!mAllUIs.TryGetValue(name, out uiObject)) { GameObject perfb = Resources.Load <GameObject>("UI/" + name); if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.LinuxEditor) { //perfb = Resources.Load<GameObject>("UI/" + name); } else { //perfb = Resources.Load<GameObject>("UI/PC/" + name); } Debug.Log(name); uiObject = GameObject.Instantiate(perfb); uiObject.name = name; uiObject.transform.SetParent(NFRoot.Instance().transform); mAllUIs.Add(name, uiObject); T panel = uiObject.GetComponent <T>(); panel.Init(); } else { uiObject.SetActive(true); //Debug.Log("open ui " + uiObject.gameObject.name); } if (uiObject) { T panel = uiObject.GetComponent <T>(); if (varList != null) { panel.mUserData = varList; } mCurrentDialog = panel; uiObject.SetActive(true); //Debug.Log("open ui " + uiObject.gameObject.name); if (bPushHistory) { mDialogs.Enqueue(panel); } return(panel); } return(null); }
void RecordEventHandler(NFGUID self, string strRecordName, NFIRecord.ERecordOptype eType, int nRow, int nCol, NFDataList.TData oldVar, NFDataList.TData newVar) { if (ColValueCondition) { if (eType == NFIRecord.ERecordOptype.Add) { if (ColConditionNum >= 0 && ColConditionContent.Length > 0) { NFIRecord xRecord = mkernelModule.FindRecord(self, recordName); if (xRecord != null) { if (xRecord.GetCols() > ColConditionNum) { switch (xRecord.GetColType(ColConditionNum)) { case NFDataList.VARIANT_TYPE.VTYPE_INT: { long value = xRecord.QueryInt(nRow, ColConditionNum); if (value.ToString() != ColConditionContent) { //remove return; } } break; case NFDataList.VARIANT_TYPE.VTYPE_STRING: { string value = xRecord.QueryString(nRow, ColConditionNum); if (value != ColConditionContent) { //remove return; } } break; default: break; } } } } } else if (eType == NFIRecord.ERecordOptype.Update) { if (nCol == ColConditionNum) { if (ColConditionNum >= 0 && ColConditionContent.Length > 0) { NFIRecord xRecord = mkernelModule.FindRecord(self, recordName); if (xRecord != null) { if (xRecord.GetCols() > ColConditionNum) { switch (xRecord.GetColType(ColConditionNum)) { case NFDataList.VARIANT_TYPE.VTYPE_INT: { long value = newVar.IntVal(); if (value.ToString() != ColConditionContent) { //remove DestroyObject(nRow); return; } } break; case NFDataList.VARIANT_TYPE.VTYPE_STRING: { string value = newVar.StringVal(); if (value != ColConditionContent) { //remove DestroyObject(nRow); return; } } break; default: break; } } } } } } } if (ColPropertyCondition) { if (ColConditionNum >= 0 && ColConditionPropertyName.Length > 0 && ColConditionPropertyValue.Length > 0) { NFIRecord xRecord = mkernelModule.FindRecord(self, recordName); if (xRecord != null) { if (xRecord.GetCols() > ColConditionNum) { switch (xRecord.GetColType(ColConditionNum)) { case NFDataList.VARIANT_TYPE.VTYPE_INT: { long value = xRecord.QueryInt(nRow, ColConditionNum); NFIElement xElement = mElementModule.GetElement(value.ToString()); if (xElement == null) { Debug.LogError("Col:" + ColConditionNum.ToString() + " Value:" + value.ToString()); return; } NFIProperty xProperty = xElement.GetPropertyManager().GetProperty(ColConditionPropertyName); if (xProperty == null) { Debug.LogError("Col:" + ColConditionNum.ToString() + " Value:" + value.ToString() + " Property:" + ColConditionPropertyName); return; } if (xProperty.GetData() != null) { switch (xProperty.GetData().GetType()) { case NFDataList.VARIANT_TYPE.VTYPE_INT: { if (xProperty.QueryInt().ToString() != ColConditionPropertyValue) { return; } } break; case NFDataList.VARIANT_TYPE.VTYPE_STRING: { if (xProperty.QueryString() != ColConditionPropertyValue) { return; } } break; } } } break; case NFDataList.VARIANT_TYPE.VTYPE_STRING: { string value = xRecord.QueryString(nRow, ColConditionNum); NFIElement xElement = mElementModule.GetElement(value); if (xElement == null) { Debug.LogError("Col:" + ColConditionNum.ToString() + " Value:" + value); return; } NFIProperty xProperty = xElement.GetPropertyManager().GetProperty(ColConditionPropertyName); if (xProperty == null) { Debug.LogError("Col:" + ColConditionNum.ToString() + " Value:" + value + " Property:" + ColConditionPropertyName); return; } if (xProperty.GetData() != null) { switch (xProperty.GetData().GetType()) { case NFDataList.VARIANT_TYPE.VTYPE_INT: { if (xProperty.QueryInt().ToString() != ColConditionPropertyValue) { return; } } break; case NFDataList.VARIANT_TYPE.VTYPE_STRING: { if (xProperty.QueryString() != ColConditionPropertyValue) { return; } } break; } } } break; default: break; } } } } } switch (eType) { case NFIRecord.ERecordOptype.Add: { NFRecordRowData rowData = new NFRecordRowData(); rowData.row = nRow; rowData.recordName = strRecordName; rowData.id = self; _data.Add(rowData); NFRoot.Instance().StartCoroutine(CreateObject(self, rowViewItem, rowData)); } break; case NFIRecord.ERecordOptype.Del: { int nIndex = -1; for (int i = 0; i < _data.Count; ++i) { NFRecordRowData rowData = _data[i]; if (rowData.row == nRow) { nIndex = i; break; } } if (nIndex >= 0) { _data.RemoveAt(nIndex); } NFRecordRowView[] rowViews = this.GetComponentsInChildren <NFRecordRowView>(); for (int i = 0; i < rowViews.Length; ++i) { NFRecordRowData rowData = rowViews[i].GetData(); if (rowData != null && rowData.row == nRow) { GameObject.Destroy(rowViews[i].gameObject); break; } } } break; case NFIRecord.ERecordOptype.Update: { if (ColValueCondition) { if (nCol == ColConditionNum) { int nIndex = -1; for (int i = 0; i < _data.Count; ++i) { NFRecordRowData rowData = _data[i]; if (rowData.row == nRow) { nIndex = i; break; } } if (nIndex < 0) { //add a new one NFRecordRowData rowData = new NFRecordRowData(); rowData.row = nRow; rowData.recordName = strRecordName; rowData.id = self; _data.Add(rowData); NFRoot.Instance().StartCoroutine(CreateObject(self, rowViewItem, rowData)); } } } { NFRecordRowView[] rowViews = this.GetComponentsInChildren <NFRecordRowView>(); for (int i = 0; i < rowViews.Length; ++i) { NFRecordRowData rowData = rowViews[i].GetData(); if (rowData != null && rowData.row == nRow) { rowViews[i].SetData(self, recordName, this, rowData); break; } } } } break; case NFIRecord.ERecordOptype.Create: break; case NFIRecord.ERecordOptype.Cleared: _data.Clear(); break; default: break; } }