private void OnBuildingAttacked(ref DefaultGameEventParam evtParam) { if (evtParam.src != 0) { ActorRoot handle = evtParam.src.handle; if ((handle != null) && HudUT.IsTower(handle)) { HudComponent3D hudControl = handle.HudControl; if (hudControl != null) { GameObject target = hudControl.GetCurrent_MapObj(); TowerHitMgr towerHitMgr = Singleton <CBattleSystem> .GetInstance().TowerHitMgr; if ((target != null) && (towerHitMgr != null)) { towerHitMgr.TryActive(handle.ObjID, target); } Image image = hudControl.GetBigTower_Img(); Image image2 = hudControl.GetSmallTower_Img(); if (((image != null) && (image2 != null)) && (handle.ValueComponent != null)) { float single = handle.ValueComponent.GetHpRate().single; image.fillAmount = single; image2.fillAmount = single; } } } } }
public ActorPreloadTab GetGlobalPreload() { ActorPreloadTab loadInfo = new ActorPreloadTab { ageActions = new List <AssetLoadBase>(), parPrefabs = new List <AssetLoadBase>(), mesPrefabs = new List <AssetLoadBase>(), spritePrefabs = new List <AssetLoadBase>(), soundBanks = new List <AssetLoadBase>(), behaviorXml = new List <AssetLoadBase>() }; this.BuildAreaTrigger(ref loadInfo); this.BuildActionHelper(ref loadInfo); this.BuildActionTrigger(ref loadInfo); this.BuildCommonSpawnPoints(ref loadInfo); this.BuildEquipInBattle(ref loadInfo); EffectPlayComponent.Preload(ref loadInfo); HudComponent3D.Preload(ref loadInfo); CBattleFloatDigitManager.Preload(ref loadInfo); OrganHitEffect.Preload(ref loadInfo); OrganWrapper.Preload(ref loadInfo); KillNotify.Preload(ref loadInfo); SkillIndicateSystem.Preload(ref loadInfo); ObjAgent.Preload(ref loadInfo); CSkillButtonManager.Preload(ref loadInfo); UpdateShadowPlane.Preload(ref loadInfo); CBattleSystem.Preload(ref loadInfo); CSkillData.Preload(ref loadInfo); return(loadInfo); }
public override void OnUse() { base.OnUse(); this.name = string.Empty; this.isMovable = true; this.isRotatable = true; this.myTransform = null; this.ActorMesh = null; this.ActorMeshAnimation = null; this._bVisible = true; this._bInitVisibleDelay = 0; this._bInCamera = false; this.ObjID = 0u; this.TheActorMeta = default(ActorMeta); this.TheStaticData = default(ActorStaticData); this.SelfPtr.Release(); this.ObjLinker = null; this.ActorControl = null; this.ActorAgent = null; this.MovementComponent = null; this.SkillControl = null; this.ValueComponent = null; this.HurtControl = null; this.HudControl = null; this.AnimControl = null; this.BuffHolderComp = null; this.MatHurtEffect = null; this.ShadowEffect = null; this.EquipComponent = null; this.DefaultAttackModeControl = null; this.LockTargetAttackModeControl = null; this.PetControl = null; this.OriginalActorMesh = null; this.OriginalMeshAnim = null; this.shape = null; this.slotList.Clear(); this.bChildUpdate = false; this.SMNode = null; this._location = VInt3.zero; this._forward = VInt3.forward; this._rotation = Quaternion.identity; this.groundY = 0; this.hasReachedNavEdge = false; this.pickFlyY = 0; this.AttackOrderReady = true; this.bOneKiller = false; this.CharInfo = null; this.HorizonMarker = null; this.BornPos = VInt3.zero; this.isRecycled = false; this.BornPos = VInt3.zero; this.PositionRecords = null; this.PositionRecordsLastStamp = 0f; }
private void SetActorReturnCityVisible(PoolObjHandle <ActorRoot> actorHandle, bool bShow) { if (!actorHandle) { return; } HudComponent3D hudControl = actorHandle.get_handle().HudControl; if (hudControl == null) { return; } if (hudControl.MapPointerSmall != null) { BackCityCom_3DUI.SetVisible(hudControl.MapPointerSmall, bShow); } if (hudControl.MapPointerBig != null) { BackCityCom_3DUI.SetVisible(hudControl.MapPointerBig, bShow); } }
public void UninitActor() { if (this.HurtControl != null) { this.HurtControl.Uninit(); } if (this.MovementComponent != null) { this.MovementComponent.Uninit(); } if (this.SkillControl != null) { this.SkillControl.Uninit(); } if (this.HudControl != null) { this.HudControl.Uninit(); } if (this.AnimControl != null) { this.AnimControl.Uninit(); } if (this.BuffHolderComp != null) { this.BuffHolderComp.Uninit(); } if (this.EffectControl != null) { this.EffectControl.Uninit(); } if (this.ActorControl != null) { this.ActorControl.Uninit(); } if (this.HorizonMarker != null) { this.HorizonMarker.Uninit(); } if (this.ValueComponent != null) { this.ValueComponent.Uninit(); } if (this.EquipComponent != null) { this.EquipComponent.Uninit(); } if (this.PetControl != null) { this.PetControl.Uninit(); } if (this.HurtControl != null) { this.HurtControl.Release(); this.HurtControl = null; } if (this.MovementComponent != null) { this.MovementComponent.Release(); this.MovementComponent = null; } if (this.SkillControl != null) { this.SkillControl.Release(); this.SkillControl = null; } if (this.HudControl != null) { this.HudControl.Release(); this.HudControl = null; } if (this.AnimControl != null) { this.AnimControl.Release(); this.AnimControl = null; } if (this.BuffHolderComp != null) { this.BuffHolderComp.Release(); this.BuffHolderComp = null; } if (this.EffectControl != null) { this.EffectControl.Release(); this.EffectControl = null; } if (this.HorizonMarker != null) { this.HorizonMarker.Release(); this.HorizonMarker = null; } if (this.ActorControl != null) { this.ActorControl.Release(); this.ActorControl = null; } if (this.ValueComponent != null) { this.ValueComponent.Release(); this.ValueComponent = null; } if (this.EquipComponent != null) { this.EquipComponent.Release(); this.EquipComponent = null; } if (this.DefaultAttackModeControl != null) { this.DefaultAttackModeControl.Release(); this.DefaultAttackModeControl = null; } if (this.LockTargetAttackModeControl != null) { this.LockTargetAttackModeControl.Release(); this.LockTargetAttackModeControl = null; } if (this.PetControl != null) { this.PetControl.Release(); this.PetControl = null; } }