//实例化Hero对象 private void CallBack_InitHeroObject() { for (int i = 0; i < GlobalMembers.MAX_TEAM_CELL_COUNT; ++i) { int nGroup = ObjectSelf.GetInstance().Teams.GetDefaultGroup(); if (nGroup < 0 && nGroup >= GlobalMembers.MAX_MATRIX_COUNT) { continue; } X_GUID pMemberGuiD = null; if (ObjectSelf.GetInstance().LimitFightMgr.m_bStartEnter) { pMemberGuiD = ObjectSelf.GetInstance().LimitFightMgr.m_HeroInfo[i]; if (ObjectSelf.GetInstance().LimitFightMgr.m_HeroHp[i] == 0) { //初始英雄时,如果血量记录是0 代表本次是继续开启的试炼。并且上次的英雄已死亡。那么本次不再实例化英雄 [6/19/2015 Zmy] pMemberGuiD.CleanUp(); } } else { pMemberGuiD = ObjectSelf.GetInstance().Teams.m_Matrix[nGroup, i]; //暂时默认上场第一组阵型的英雄[3/25/2015 Zmy] } if (!pMemberGuiD.IsValid()) { continue; } ObjectCard pHero = ObjectSelf.GetInstance().HeroContainerBag.FindHero(pMemberGuiD); if (pHero == null) { continue; } ArtresourceTemplate _Artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(pHero.GetHeroData().GetHeroViewID()); if (_Artresourcedata == null) { continue; } GameObject pHeroObject = AssetLoader.Inst.GetAssetRes(_Artresourcedata.getArtresources()); if (pHeroObject != null) { GameObject obj1 = Instantiate(pHeroObject, FightEditorContrler.GetInstantiate().GetFormationCenterPos(i), FightEditorContrler.GetInstantiate().GetFormationCenterAngle(i)) as GameObject; GameUtils.SetLayerRecursively(obj1, FightEditorContrler.GetInstantiate().GetShadowCullMaskLayer()); float _zoom = _Artresourcedata.getArtresources_zoom(); obj1.transform.localScale = new UnityEngine.Vector3(_zoom, _zoom, _zoom); SceneObjectManager.GetInstance().SceneObjectAddHero(obj1, pHero.GetHeroRow().getId(), pHero); FightEditorContrler.GetInstantiate().InitFormationPos(pHero, i); } } FightEditorContrler.GetInstantiate().HeroPathInitSpeed(); GameEventDispatcher.Inst.dispatchEvent(GameEventID.SE_StoryCameraEnd); //初始化完成后,切换状态 [1/20/2015 Zmy] SetFightState(FightState.prepareData); //初始入场怒气 InitFightPower(); }
public bool OnFinish() { LogManager.LogAssert(m_pHolder); LogManager.LogAssert(m_pSpellInfo); m_pSpellInfo = null; m_SpellTarget.CleanUp(); m_SpellTargetDir = 0.0f; m_SpellTargetPosition = new Vector3(0, 0, 0); return(true); }
/// <summary> /// 清理操作 /// </summary> public void CleanUp() { m_nCreaterType = int.MaxValue; m_CasterGUID.CleanUp(); m_nImpactID = -1; m_ImpactTime = 0; m_ElapsedTime = 0; m_IntervalTime = 0; m_ElapsedIntervalTime = 0; m_nCount = 0; m_nLayedCount = 1; }
/// <summary> /// 清理操作 /// </summary> public void CleanUp() { m_ItemTableID = int.MaxValue; bBind = 0; m_GUID.CleanUp(); nCount = 0; level = 0; attributeCount = 0; for (int i = 0; i < GlobalMembers.MAX_RUNE_APPEND_ATTRIBUTE_COUNT; ++i) { attribute[i].CleanUp(); } }
// ============================= 事件响应回调函数 ================================= //实例化hero出场特效; private void CallBack_InitHeroEffect() { for (int i = 0; i < GlobalMembers.MAX_TEAM_CELL_COUNT; ++i) { int nGroup = ObjectSelf.GetInstance().Teams.GetDefaultGroup(); if (nGroup < 0 && nGroup >= GlobalMembers.MAX_MATRIX_COUNT) { continue; } X_GUID pMemberGuiD = null; if (ObjectSelf.GetInstance().LimitFightMgr.m_bStartEnter) { pMemberGuiD = ObjectSelf.GetInstance().LimitFightMgr.m_HeroInfo[i]; if (ObjectSelf.GetInstance().LimitFightMgr.m_HeroHp[i] == 0) { //初始英雄时,如果血量记录是0 代表本次是继续开启的试炼。并且上次的英雄已死亡。那么本次不再实例化英雄 [6/19/2015 Zmy] pMemberGuiD.CleanUp(); } } else { pMemberGuiD = ObjectSelf.GetInstance().Teams.m_Matrix[nGroup, i]; //暂时默认上场第一组阵型的英雄[3/25/2015 Zmy] } if (!pMemberGuiD.IsValid()) { continue; } ObjectCard pHero = ObjectSelf.GetInstance().HeroContainerBag.FindHero(pMemberGuiD); if (pHero == null) { continue; } ArtresourceTemplate _Artresourcedata = (ArtresourceTemplate)DataTemplate.GetInstance().m_ArtresourceTable.getTableData(pHero.GetHeroData().GetHeroViewID()); if (_Artresourcedata == null) { continue; } GameObject pHeroObject = AssetLoader.Inst.GetAssetRes(_Artresourcedata.getArtresources()); if (pHeroObject != null) { //创建出场特效; GameObject eff = Instantiate(Resources.Load("Effect/Effect_Chuchang01"), FightEditorContrler.GetInstantiate().GetFormationCenterPos(i), FightEditorContrler.GetInstantiate().GetFormationCenterAngle(i)) as GameObject; Destroy(eff, 0.3f); } } Invoke("CallBack_InitHeroObject", 0.3f); }
/// <summary> /// 清理操作 /// </summary> public void CleanUp() { m_MemberGUID.CleanUp(); m_IconID = -1; m_nVIPLevel = 0; m_nLevel = 0; m_nRank = 0; m_LoginTime = 0; m_QuitTime = 0; m_Comat = 0; m_TeamCombat = 0; m_Camp = 0; m_CycleCharge = 0; m_GuildGuid.CleanUp(); }
/// <summary> /// 清理操作 /// </summary> public void CleanUp() { m_Guid.CleanUp(); m_TableID = -1; m_Level = 0; m_Exp = 0; for (int i = 0; i < GlobalMembers.MAX_TRAIN_SLOT_COUNT; ++i) { this.m_TrainCount [i] = 0; } for (int i = 0; i < GlobalMembers.MAX_DB_SPELL_NUM; ++i) { if (m_SpellData [i] == null) { m_SpellData [i] = new SpellData(); } m_SpellData [i].CleanUp(); m_CacheSpellID [i] = -1; } for (int i = 0; i < ( int )EM_RUNE_POINT.EM_RUNE_POINT_NUMBER; ++i) { if (m_pItem [i] == null) { m_pItem [i] = new X_GUID(); } m_pItem [i].CleanUp(); } m_ItemPassiveSpell.CleanUp(); m_HeroViewID = 0; m_AllExp = 0; m_IntensifyLevel = 0; m_Weapon = 0; m_Barde = 0; m_Ornament = 0; m_IntensifyAddtion = 0; m_StarLevel = 0; m_CurStage = 0; FightVigor = 0; QualityLev = 0; m_SkillDB.ClearUp(); m_CabalaDB.ClearUp(); m_TrainDB.ClearUp(); m_EquipDB.ClearUp(); }
public void clear() { mSelctRoleUID.CleanUp(); mSelectSkillID = 0; }
public BaseItem() { m_BaseGuid.CleanUp(); m_BaseTableID = -1; m_Count = 0; }