// Use this for initialization private void Awake() { mkernelModule = NFPluginManager.Instance().FindModule <NFIKernelModule>(); mClassModule = NFPluginManager.Instance().FindModule <NFIClassModule>(); mLoginModule = NFPluginManager.Instance().FindModule <NFLoginModule>(); mElementModule = NFPluginManager.Instance().FindModule <NFIElementModule>(); }
// Use this for initialization private void Awake() { mkernelModule = NFPluginManager.Instance().FindModule <NFIKernelModule>(); mClassModule = NFPluginManager.Instance().FindModule <NFIClassModule>(); mLoginModule = NFPluginManager.Instance().FindModule <NFLoginModule>(); mElementModule = NFPluginManager.Instance().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 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 = NFPluginManager.Instance(); mNetModule = xPluginManager.FindModule <NFNetModule>(); mLoginModule = xPluginManager.FindModule <NFLoginModule>(); mUIModule = xPluginManager.FindModule <NFUIModule>(); mEventModule = xPluginManager.FindModule <NFIEventModule>(); mKernelModule = NFPluginManager.Instance().FindModule <NFIKernelModule>(); mElementModule = NFPluginManager.Instance().FindModule <NFIElementModule>(); }
private void Start() { mxHeroMotor = GetComponent <NFHeroMotor>(); mxSyncBuffer = GetComponent <NFHeroSyncBuffer>(); mxBodyIdent = GetComponent <NFBodyIdent>(); mAnimaStateMachine = GetComponent <NFAnimaStateMachine>(); mAnimatStateController = GetComponent <NFAnimatStateController>(); mNetModule = NFRoot.Instance().GetPluginManager().FindModule <NFNetModule>(); mLoginModule = NFRoot.Instance().GetPluginManager().FindModule <NFLoginModule>(); mHelpModule = NFRoot.Instance().GetPluginManager().FindModule <NFHelpModule>(); mKernelModule = NFRoot.Instance().GetPluginManager().FindModule <NFIKernelModule>(); }
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); }
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>(); }
void Start() { mStateMachineMng = GetComponent <NFAnimaStateMachine>(); mBodyIdent = GetComponent <NFBodyIdent>(); mHeroMotor = GetComponent <NFHeroMotor>(); mUIModule = NFPluginManager.Instance().FindModule <NFUIModule>(); mLoginModule = NFPluginManager.Instance().FindModule <NFLoginModule>(); mKernelModule = NFPluginManager.Instance().FindModule <NFIKernelModule>(); mKernelModule.RegisterPropertyCallback(mBodyIdent.GetObjectID(), NFrame.Player.MOVE_SPEED, PropertyMoveSpeedHandler); mKernelModule.RegisterPropertyCallback(mBodyIdent.GetObjectID(), NFrame.Player.ATK_SPEED, PropertyAttackSpeedHandler); mHeroMotor.angularSpeed = 0f; }
//=================================================================================================================o public override void Awake() { base.Awake(); _walkSpeed = 1.5f; angularSpeed = 0f; mKernelModule = NFPluginManager.Instance().FindModule <NFIKernelModule>(); mSceneModule = NFPluginManager.Instance().FindModule <NFSceneModule>(); mLoginModule = NFPluginManager.Instance().FindModule <NFLoginModule>(); mNetModule = NFPluginManager.Instance().FindModule <NFNetModule>(); mUIModule = NFPluginManager.Instance().FindModule <NFUIModule>(); mAnima = GetComponent <NFAnimatStateController>(); }
void Start() { _instance = this; Debug.Log("Root Start " + Application.platform); RenderSettings.fog = false; mConfig.Load(); mPluginManager.Registered(new NFSDKPlugin(mPluginManager)); mPluginManager.Registered(new NFUIPlugin(mPluginManager)); mPluginManager.Registered(new NFScenePlugin(mPluginManager)); mKernelModule = mPluginManager.FindModule <NFIKernelModule>(); mClassModule = mPluginManager.FindModule <NFIClassModule>(); mNetModule = mPluginManager.FindModule <NFNetModule>(); mUIModule = mPluginManager.FindModule <NFUIModule>(); mLogModule = mPluginManager.FindModule <NFLogModule>(); mClassModule.SetDataPath(mConfig.GetDataPath()); mPluginManager.Awake(); mPluginManager.Init(); mPluginManager.AfterInit(); mUIModule.ShowUI <NFUILogin>(); if (mConfig.GetServerList().Count > 1) { mbShowServer = true; } else { string strTargetIP = "127.0.0.1"; if (mConfig.GetSelectServer(ref strTargetIP)) { mNetModule.StartConnect(strTargetIP, port); } } DontDestroyOnLoad(gameObject); }
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 Init() { NFIPluginManager xPluginManager = NFRoot.Instance().GetPluginManager(); mKernelModule = xPluginManager.FindModule <NFIKernelModule>(); }
public void OnGUI(NFIKernelModule kernel, int nHeight, int nWidth) { if (buttonLeft == null) { buttonLeft = GUI.skin.button; buttonLeft.alignment = TextAnchor.MiddleLeft; } int nElementWidth = 300; int nElementHeight = 20; GUI.color = Color.red; strInfo = GUI.TextField(new Rect(0, nHeight - 20, nElementWidth, 20), strInfo); strCommand = GUI.TextField(new Rect(nElementWidth, nHeight - 20, 350, 20), strCommand); if (GUI.Button(new Rect(nElementWidth + 350, nHeight - 20, 100, 20), "cmd")) { } GUI.color = Color.white; NFDataList objectList = kernel.GetObjectList(); scrollPositionFirst = GUI.BeginScrollView(new Rect(0, nElementHeight, nElementWidth / 2 + 20, nHeight - 100), scrollPositionFirst, new Rect(0, 0, nElementWidth, objectList.Count() * (nElementHeight))); //all object for (int i = 0; i < objectList.Count(); i++) { NFGUID ident = objectList.ObjectVal(i); string id = ident.nHead64.ToString() + "_" + ident.nData64.ToString(); NFLoginModule xLoginModule = kernel.mPluginManager.FindModule <NFLoginModule>(); if (ident == xLoginModule.mRoleID) { id = "++" + id; } if (GUI.Button(new Rect(0, i * nElementHeight, nElementWidth, nElementHeight), id)) { xTargetIdent = ident; strTableName = ""; strInfo = ident.ToString(); } } GUI.EndScrollView(); //////////////// //if(!xTargetIdent.IsNull()) { NFIObject go = kernel.GetObject(xTargetIdent); if (null != go) { NFDataList recordLlist = go.GetRecordManager().GetRecordList(); NFDataList propertyList = go.GetPropertyManager().GetPropertyList(); int nAllElement = 1; for (int j = 0; j < recordLlist.Count(); j++) { string strRecordName = recordLlist.StringVal(j); if (strRecordName.Length > 0) { nAllElement++; } } for (int j = 0; j < propertyList.Count(); j++) { string strPropertyName = propertyList.StringVal(j); if (strPropertyName.Length > 0) { nAllElement++; } } ////////////////// scrollPositionSecond = GUI.BeginScrollView(new Rect(nElementWidth / 2 + 25, nElementHeight, nElementWidth / 2 + 25, nHeight - 100), scrollPositionSecond, new Rect(0, 0, nElementWidth, (nAllElement + 1) * (nElementHeight) + 1)); int nElementIndex = 0; GUI.Button(new Rect(0, nElementIndex * nElementHeight, nElementWidth, nElementHeight), xTargetIdent.ToString()); nElementIndex++; //all record List <string> xRecordList = new List <string>(); for (int j = 0; j < recordLlist.Count(); j++) { xRecordList.Add(recordLlist.StringVal(j)); } xRecordList.Sort(); for (int j = 0; j < xRecordList.Count; j++) { string strRecordName = xRecordList [j]; if (strRecordName.Length > 0) { if (GUI.Button(new Rect(0, nElementIndex * nElementHeight, nElementWidth, nElementHeight), "++" + strRecordName)) { strTableName = strRecordName; } nElementIndex++; } } /////////////////////////////// //all property List <string> xPropertyList = new List <string>(); for (int k = 0; k < propertyList.Count(); k++) { xPropertyList.Add(propertyList.StringVal(k)); } xPropertyList.Sort(); for (int k = 0; k < xPropertyList.Count; k++) { string strPropertyValue = null; string strPropertyName = xPropertyList[k]; NFIProperty property = go.GetPropertyManager().GetProperty(strPropertyName); NFDataList.VARIANT_TYPE eType = property.GetType(); switch (eType) { case NFDataList.VARIANT_TYPE.VTYPE_FLOAT: strPropertyValue = property.QueryFloat().ToString(); break; case NFDataList.VARIANT_TYPE.VTYPE_INT: strPropertyValue = property.QueryInt().ToString(); break; case NFDataList.VARIANT_TYPE.VTYPE_OBJECT: strPropertyValue = property.QueryObject().ToString(); break; case NFDataList.VARIANT_TYPE.VTYPE_STRING: strPropertyValue = property.QueryString(); break; case NFDataList.VARIANT_TYPE.VTYPE_VECTOR2: strPropertyValue = property.QueryVector2().ToString(); break; case NFDataList.VARIANT_TYPE.VTYPE_VECTOR3: strPropertyValue = property.QueryVector3().ToString(); break; default: strPropertyValue = "?"; break; } if (strPropertyName.Length > 0) { if (GUI.Button(new Rect(0, nElementIndex * nElementHeight, nElementWidth, nElementHeight), strPropertyName + ":" + strPropertyValue)) { strTableName = ""; strInfo = strPropertyName + ":" + strPropertyValue; } nElementIndex++; } } GUI.EndScrollView(); //////////////////////// if (strTableName.Length > 0) { NFIRecord record = go.GetRecordManager().GetRecord(strTableName); if (null != record) { int nRow = record.GetRows(); int nCol = record.GetCols(); int nOffest = 30; scrollPositionThird = GUI.BeginScrollView(new Rect(nElementWidth + 50, nElementHeight, nElementWidth * 3, nHeight / 2), scrollPositionThird, new Rect(0, 0, nElementWidth * nCol + nOffest, nRow * nElementHeight + nOffest)); string selString = null; for (int row = 0; row < nRow; row++) { GUI.Button(new Rect(0, row * nElementHeight + nOffest, nOffest, nElementHeight), row.ToString()); //row for (int col = 0; col < nCol; col++) { if (0 == row) { GUI.Button(new Rect(col * nElementWidth + nOffest, 0, nElementWidth, nElementHeight), col.ToString() + " [" + record.GetColType(col) + "]" + record.GetColTag(col)); } if (record.IsUsed(row)) { NFDataList.VARIANT_TYPE eType = record.GetColType(col); switch (eType) { case NFDataList.VARIANT_TYPE.VTYPE_INT: selString = record.QueryInt(row, col).ToString(); break; case NFDataList.VARIANT_TYPE.VTYPE_FLOAT: selString = record.QueryFloat(row, col).ToString(); break; case NFDataList.VARIANT_TYPE.VTYPE_STRING: selString = record.QueryString(row, col); break; case NFDataList.VARIANT_TYPE.VTYPE_OBJECT: selString = record.QueryObject(row, col).ToString(); break; case NFDataList.VARIANT_TYPE.VTYPE_VECTOR2: selString = record.QueryVector2(row, col).ToString(); break; case NFDataList.VARIANT_TYPE.VTYPE_VECTOR3: selString = record.QueryVector3(row, col).ToString(); break; default: selString = "UnKnowType"; break; } } else { selString = "NoUse"; } if (GUI.Button(new Rect(col * nElementWidth + nOffest, row * nElementHeight + nOffest, nElementWidth, nElementHeight), selString)) { strInfo = "Row:" + row.ToString() + " Col:" + col.ToString() + " " + selString; } } } GUI.EndScrollView(); } } } } }
void Start() { NFIPluginManager xPluginManager = NFCPluginManager.Instance(); mKernelModule = xPluginManager.FindModule <NFIKernelModule>(); }