// 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; } }
private void Awake() { NFIPluginManager xPluginManager = NFRoot.Instance().GetPluginManager(); mLoginModule = xPluginManager.FindModule <NFLoginModule>(); mUIModule = xPluginManager.FindModule <NFUIModule>(); mSceneModule = xPluginManager.FindModule <NFSceneModule>(); mEventModule = xPluginManager.FindModule <NFIEventModule>(); mElementModule = xPluginManager.FindModule <NFIElementModule>(); }
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 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>(); }
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 bool ShowAddItem(int nWidth, int nHeight) { NFIElementModule xElementModule = NFCKernelModule.Instance.GetElementModule(); NFIClassModule xLogicClassModule = NFCKernelModule.Instance.GetLogicClassModule(); if (null == xLogicClassModule || null == xElementModule) { return(false); } int nElementWidth = 150; int nElementHeight = 20; GUI.color = Color.green; mstrItemID = GUI.TextField(new Rect(nElementWidth * 1, nElementHeight, nElementWidth * 1, nElementHeight), mstrItemID); mstrItemCount = GUI.TextField(new Rect(nElementWidth * 2, nElementHeight, nElementWidth * 1, nElementHeight), mstrItemCount); GUI.color = Color.white; if (GUI.Button(new Rect(nElementWidth * 3, nElementHeight, nElementWidth / 2, nElementHeight), "Add")) { long nItemCount = 1; long.TryParse(mstrItemCount, out nItemCount); //NFNetController.Instance.mxNetSender.RequireNormalGM(NFNetController.Instance.xMainRoleID, NFMsg.ReqCommand.EGameCommandType.EGCT_MODIY_ITEM, mstrItemID, mstrItemID, nItemCount, 0.0f, new NFGUID()); } NFIClass xItemClass = xLogicClassModule.GetElement("Item"); NFIClass xEquipClass = xLogicClassModule.GetElement("Equip"); List <string> xItemIDList = null; List <string> xEquipIDList = null; if (null != xItemClass) { xItemIDList = xItemClass.GetConfigNameList(); } if (null != xEquipClass) { xEquipIDList = xEquipClass.GetConfigNameList(); } int nmaxCount = xItemIDList.Count; if (nmaxCount < xEquipIDList.Count) { nmaxCount = xEquipIDList.Count; } AddItemscrollPositionFirst = GUI.BeginScrollView(new Rect(0, nElementHeight * 2, nWidth, nHeight), AddItemscrollPositionFirst, new Rect(0, 0, nElementWidth * 2.5f, nmaxCount * (nElementHeight))); for (int i = 0; i < nmaxCount; i++) { string strItemID = ""; string strEquipID = ""; if (i < xItemIDList.Count) { strItemID = xItemIDList[i]; } if (i < xEquipIDList.Count) { strEquipID = xEquipIDList[i]; } int BeginHeight = 0; BeginHeight = nElementHeight + nElementHeight * i; if (strItemID != "") { if (GUI.Button(new Rect(nElementWidth * 1, BeginHeight, nElementWidth, nElementHeight), strItemID)) { mstrItemID = strItemID; } } if (strEquipID != "") { if (GUI.Button(new Rect(nElementWidth * 2, BeginHeight, nElementWidth, nElementHeight), strEquipID)) { mstrItemID = strEquipID; } } } GUI.EndScrollView(); return(true); }