public override void Leave(Action _action, Track _track) { base.Leave(_action, _track); if (!this.bEyeObj) { if (this.m_particleObj) { this.m_particleObj.transform.parent = null; ActionManager.DestroyGameObject(this.m_particleObj); } GameObject gameObject = _action.GetGameObject(this.targetId); if (this.targetId >= 0 && gameObject != null) { if (this.applyActionSpeedToAnimation) { _action.RemoveTempObject(Action.PlaySpeedAffectedType.ePSAT_Anim, gameObject); } if (this.applyActionSpeedToParticle) { _action.RemoveTempObject(Action.PlaySpeedAffectedType.ePSAT_Fx, gameObject); } if (this.bInvisibleBullet && this.actorRoot.get_handle().ActorControl != null) { BulletWrapper bulletWrapper = this.actorRoot.get_handle().ActorControl as BulletWrapper; if (bulletWrapper != null) { bulletWrapper.UninitForInvisibleBullet(); } } this.RemoveBullet(); ActorHelper.DetachActorRoot(gameObject); ActionManager.DestroyGameObjectFromAction(_action, gameObject); } } if (this.actorSlot != null) { PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.parentId); if (actorHandle) { actorHandle.get_handle().RemoveActorRootSlot(this.actorSlot); } this.actorSlot = null; } }
public void Leave(Action _action, Track _track) { if (this.moveActor) { this.moveActor.get_handle().ObjLinker.RmvCustomMoveLerp(new CustomMoveLerpFunc(this.ActionMoveLerp)); this.moveActor.get_handle().myTransform.position = (Vector3)this.moveActor.get_handle().location; if (this.moveActor.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Bullet) { BulletWrapper bulletWrapper = this.moveActor.get_handle().ActorControl as BulletWrapper; if (bulletWrapper != null && bulletWrapper.GetMoveCollisiong()) { bulletWrapper.SetMoveDelta(0); } } } this.skillContext = null; this.tarActor.Release(); this.moveActor.Release(); this.gravityControler = null; }
private void CreateBullet() { if (this.actorRoot) { Singleton <GameObjMgr> .get_instance().AddBullet(ref this.actorRoot); BulletWrapper bulletWrapper = this.actorRoot.get_handle().ActorControl as BulletWrapper; if (bulletWrapper != null) { if (this.bMoveCollision) { bulletWrapper.SetMoveCollision(this.bMoveCollision); } if (FogOfWar.enable) { bulletWrapper.SightRadius = this.sightRadius; COM_PLAYERCAMP playerCamp = Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().PlayerCamp; if (bulletWrapper.actor.TheActorMeta.ActorCamp != playerCamp) { bulletWrapper.m_bVisibleByFow = this.bVisibleByFow; bulletWrapper.m_bVisibleByShape = this.bCheckVisibleByShape; if (this.bVisibleByFow) { if (this.bCheckVisibleByShape) { GameFowCollector.SetObjWithColVisibleByFow(this.actorRoot, Singleton <GameFowManager> .get_instance(), playerCamp); } else { GameFowCollector.SetObjVisibleByFow(this.actorRoot.get_handle().gameObject, Singleton <GameFowManager> .get_instance(), playerCamp); } } } } } } }
public void ConditionalUpdateShape() { if (this.dirty) { ActorRoot handle = this.owner.handle; if (this.isBox && handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Bullet) { BulletWrapper bulletWrapper = handle.ActorControl as BulletWrapper; if (bulletWrapper != null && bulletWrapper.GetMoveCollisiong()) { this.UpdateShape(handle.location, handle.forward, bulletWrapper.GetMoveDelta()); } else { this.UpdateShape(handle.location, handle.forward); } } else { this.UpdateShape(handle.location, handle.forward); } } }
private void CreateBullet() { if (this.actorRoot) { Singleton <GameObjMgr> .instance.AddBullet(ref this.actorRoot); BulletWrapper bulletWrapper = this.actorRoot.handle.ActorControl as BulletWrapper; if (bulletWrapper != null) { if (this.bMoveCollision) { bulletWrapper.SetMoveCollision(this.bMoveCollision); } if (FogOfWar.enable) { bulletWrapper.SightRadius = this.sightRadius; if (Singleton <WatchController> .instance.IsWatching || !Singleton <WatchController> .instance.CoversCamp(bulletWrapper.actor.TheActorMeta.ActorCamp)) { bulletWrapper.m_bVisibleByFow = this.bVisibleByFow; bulletWrapper.m_bVisibleByShape = this.bCheckVisibleByShape; if (this.bVisibleByFow) { if (this.bCheckVisibleByShape) { bulletWrapper.UpdateSubParObjVisibility(GameFowCollector.SetObjWithColVisibleByFow(this.actorRoot, Singleton <GameFowManager> .instance, Singleton <WatchController> .instance.HorizonCamp)); } else { bulletWrapper.UpdateSubParObjVisibility(GameFowCollector.SetObjVisibleByFow(this.actorRoot, this.actorRoot.handle.gameObject, Singleton <GameFowManager> .instance, Singleton <WatchController> .instance.HorizonCamp)); } } } } } } }
private void EnterSpawnBullet(Action _action, Track _track) { string resourceName; if (this.bUseSkin) { resourceName = SkinResourceHelper.GetResourceName(_action, this.prefabName, this.bUseSkinAdvance); } else { resourceName = this.prefabName; } VInt3 vInt = VInt3.zero; VInt3 forward = VInt3.forward; SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); COM_PLAYERCAMP camp = (refParamObject == null || !refParamObject.Originator) ? 0 : refParamObject.Originator.get_handle().TheActorMeta.ActorCamp; GameObject gameObject = _action.GetGameObject(this.parentId); PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.parentId); PoolObjHandle <ActorRoot> actorHandle2 = _action.GetActorHandle(this.objectSpaceId); if (actorHandle2) { ActorRoot handle = actorHandle2.get_handle(); if (this.superTranslation) { VInt3 zero = VInt3.zero; _action.refParams.GetRefParam("_BulletPos", ref zero); vInt = IntMath.Transform(zero, handle.forward, handle.location); } else if (this.modifyTranslation) { vInt = IntMath.Transform(this.translation, handle.forward, handle.location); } if (this.modifyDirection) { forward = actorHandle2.get_handle().forward; } } else if (this.bTargetPosition) { vInt = this.translation + this.targetPosition; if (this.modifyDirection && refParamObject != null && refParamObject.Originator) { forward = refParamObject.Originator.get_handle().forward; } } else { if (this.modifyTranslation) { vInt = this.translation; } if (this.modifyDirection && this.direction.x != 0 && this.direction.y != 0) { forward = this.direction; forward.NormalizeTo(1000); } } if (this.targetId >= 0) { _action.ExpandGameObject(this.targetId); GameObject gameObject2 = _action.GetGameObject(this.targetId); if (this.recreateExisting && gameObject2 != null) { if (this.applyActionSpeedToAnimation) { _action.RemoveTempObject(Action.PlaySpeedAffectedType.ePSAT_Anim, gameObject2); } if (this.applyActionSpeedToParticle) { _action.RemoveTempObject(Action.PlaySpeedAffectedType.ePSAT_Fx, gameObject2); } ActorHelper.DetachActorRoot(gameObject2); ActionManager.DestroyGameObject(gameObject2); _action.SetGameObject(this.targetId, null); } bool flag = true; if (!(gameObject2 == null)) { return; } if (this.bForbidBulletInObstacle && !PathfindingUtility.IsValidTarget(refParamObject.Originator.get_handle(), vInt)) { bool flag2 = false; VInt3 vInt2 = PathfindingUtility.FindValidTarget(refParamObject.Originator.get_handle(), vInt, refParamObject.Originator.get_handle().location, 10000, out flag2); if (flag2) { VInt vInt3 = 0; PathfindingUtility.GetGroundY(vInt2, out vInt3); vInt2.y = vInt3.i; vInt = vInt2; } else { vInt = refParamObject.Originator.get_handle().location; } } GameObject gameObject3 = MonoSingleton <SceneMgr> .GetInstance().Spawn("TempObject", SceneObjType.Bullet, vInt, forward); if (!gameObject3) { throw new Exception("Age:SpawnObjectDuration Spawn Exception"); } gameObject3.transform.localScale = Vector3.one; bool flag3 = true; int particleLOD = GameSettings.ParticleLOD; if (GameSettings.DynamicParticleLOD) { if (refParamObject != null && refParamObject.Originator && refParamObject.Originator.get_handle().TheActorMeta.PlayerId == Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer().PlayerId) { flag3 = false; } if (!flag3 && particleLOD > 1) { GameSettings.ParticleLOD = 1; } MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = flag3; } this.m_particleObj = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(resourceName, true, SceneObjType.ActionRes, gameObject3.transform.position, gameObject3.transform.rotation, out flag); if (GameSettings.DynamicParticleLOD) { MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = false; } if (this.m_particleObj == null) { if (GameSettings.DynamicParticleLOD) { MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = flag3; } this.m_particleObj = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(this.prefabName, true, SceneObjType.ActionRes, gameObject3.transform.position, gameObject3.transform.rotation, out flag); if (GameSettings.DynamicParticleLOD) { MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = false; } } if (GameSettings.DynamicParticleLOD) { GameSettings.ParticleLOD = particleLOD; } if (this.m_particleObj != null) { this.m_particleObj.transform.SetParent(gameObject3.transform); this.m_particleObj.transform.localPosition = Vector3.zero; this.m_particleObj.transform.localRotation = Quaternion.identity; } this.actorRoot = ActorHelper.AttachActorRoot(gameObject3, ActorTypeDef.Actor_Type_Bullet, camp, null); _action.SetGameObject(this.targetId, gameObject3); this.actorRoot.get_handle().location = vInt; this.actorRoot.get_handle().forward = forward; VCollisionShape.InitActorCollision(this.actorRoot, this.m_particleObj, _action.actionName); if (this.actorRoot.get_handle().shape != null) { this.actorRoot.get_handle().shape.ConditionalUpdateShape(); } if (this.bInvisibleBullet && this.actorRoot.get_handle().ActorControl != null) { BulletWrapper bulletWrapper = this.actorRoot.get_handle().ActorControl as BulletWrapper; if (bulletWrapper != null) { bulletWrapper.InitForInvisibleBullet(); } } this.actorRoot.get_handle().InitActor(); if (refParamObject != null) { refParamObject.EffectPos = this.actorRoot.get_handle().location; if (this.actorRoot.get_handle().TheActorMeta.ActorType != ActorTypeDef.Actor_Type_EYE) { this.CreateBullet(); } } if (this.applyActionSpeedToAnimation) { _action.AddTempObject(Action.PlaySpeedAffectedType.ePSAT_Anim, gameObject3); } if (this.applyActionSpeedToParticle) { _action.AddTempObject(Action.PlaySpeedAffectedType.ePSAT_Fx, gameObject3); } this.actorRoot.get_handle().StartFight(); if (this.enableLayer || this.enableTag) { if (this.enableLayer) { gameObject3.layer = this.layer; } if (this.enableTag) { gameObject3.tag = this.tag; } Transform[] componentsInChildren = gameObject3.GetComponentsInChildren <Transform>(); for (int i = 0; i < componentsInChildren.Length; i++) { if (this.enableLayer) { componentsInChildren[i].gameObject.layer = this.layer; } if (this.enableTag) { componentsInChildren[i].gameObject.tag = this.tag; } } } if (flag) { ParticleHelper.Init(gameObject3, this.scaling); } PoolObjHandle <ActorRoot> actorHandle3 = _action.GetActorHandle(this.targetId); this.SetParent(ref actorHandle, ref actorHandle3, this.translation); if (this.modifyScaling) { gameObject3.transform.localScale = this.scaling; } } else { GameObject gameObject4; if (this.modifyDirection) { gameObject4 = MonoSingleton <SceneMgr> .GetInstance().InstantiateLOD(this.prefabName, true, SceneObjType.ActionRes, (Vector3)vInt, Quaternion.LookRotation((Vector3)forward)); } else { gameObject4 = MonoSingleton <SceneMgr> .GetInstance().InstantiateLOD(this.prefabName, true, SceneObjType.ActionRes, (Vector3)vInt); } if (gameObject4 == null) { return; } if (this.applyActionSpeedToAnimation) { _action.AddTempObject(Action.PlaySpeedAffectedType.ePSAT_Anim, gameObject4); } if (this.applyActionSpeedToParticle) { _action.AddTempObject(Action.PlaySpeedAffectedType.ePSAT_Fx, gameObject4); } if (this.enableLayer) { gameObject4.layer = this.layer; Transform[] componentsInChildren2 = gameObject4.GetComponentsInChildren <Transform>(); for (int j = 0; j < componentsInChildren2.Length; j++) { componentsInChildren2[j].gameObject.layer = this.layer; } } if (this.enableTag) { gameObject4.tag = this.tag; Transform[] componentsInChildren3 = gameObject4.GetComponentsInChildren <Transform>(); for (int k = 0; k < componentsInChildren3.Length; k++) { componentsInChildren3[k].gameObject.tag = this.tag; } } if (gameObject4.GetComponent <ParticleSystem>() && this.modifyScaling) { ParticleSystem[] componentsInChildren4 = gameObject4.GetComponentsInChildren <ParticleSystem>(); for (int l = 0; l < componentsInChildren4.Length; l++) { componentsInChildren4[l].startSize *= this.scaling.x; componentsInChildren4[l].startLifetime *= this.scaling.y; componentsInChildren4[l].startSpeed *= this.scaling.z; componentsInChildren4[l].transform.localScale *= this.scaling.x; } } PoolObjHandle <ActorRoot> poolObjHandle = ActorHelper.GetActorRoot(gameObject4); this.SetParent(ref actorHandle, ref poolObjHandle, this.translation); if (this.modifyScaling) { gameObject4.transform.localScale = this.scaling; } } }
public void ProcessInner(Action _action, Track _track, int delta) { VInt3 location = this.moveActor.get_handle().location; if (this.MoveType == ActorMoveType.Target && this.tarActor) { this.destPosition = this.tarActor.get_handle().location; if (this.tarActor && this.tarActor.get_handle().CharInfo != null) { CActorInfo charInfo = this.tarActor.get_handle().CharInfo; this.hitHeight = charInfo.iBulletHeight; VInt3 vInt = this.moveActor.get_handle().location - this.destPosition; vInt.y = 0; vInt = vInt.NormalizeTo(1000); this.destPosition += IntMath.Divide(vInt, (long)charInfo.iCollisionSize.x, 1000L); } this.destPosition.y = this.destPosition.y + this.hitHeight; } this.moveDirection = this.destPosition - location; this.lerpDirection = this.moveDirection; if (this.bMoveRotate) { this.RotateMoveBullet(this.moveDirection); } int num; if (!this.shouldUseAcceleration) { num = this.velocity * delta / 1000; } else { long num2 = (long)this.lastVelocity * (long)delta + (long)this.acceleration * (long)delta * (long)delta / 2L / 1000L; num2 /= 1000L; num = (int)num2; this.lastVelocity += this.acceleration * delta / 1000; } if ((long)num * (long)num >= this.moveDirection.get_sqrMagnitudeLong2D() && this.bReachDestStop) { int magnitude2D = (this.destPosition - this.moveActor.get_handle().location).get_magnitude2D(); this.moveActor.get_handle().location = this.destPosition; this.stopCondtion = true; if (this.moveActor.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Bullet) { BulletWrapper bulletWrapper = this.moveActor.get_handle().ActorControl as BulletWrapper; if (bulletWrapper != null && bulletWrapper.GetMoveCollisiong()) { bulletWrapper.SetMoveDelta(magnitude2D); } } } else { VInt3 location2; if (this.gravity < 0) { this.moveDirection.y = 0; location2 = location + this.moveDirection.NormalizeTo(num); location2.y += this.gravityControler.GetMotionDeltaDistance(delta); VInt vInt2; if (PathfindingUtility.GetGroundY(this.destPosition, out vInt2) && location2.y < vInt2.i) { location2.y = vInt2.i; } } else { location2 = location + this.moveDirection.NormalizeTo(num); } if (this.moveActor.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Bullet) { BulletWrapper bulletWrapper2 = this.moveActor.get_handle().ActorControl as BulletWrapper; if (bulletWrapper2 != null && bulletWrapper2.GetMoveCollisiong()) { bulletWrapper2.SetMoveDelta(num); } } this.moveActor.get_handle().location = location2; } SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (refParamObject != null) { refParamObject.EffectPos = this.moveActor.get_handle().location; refParamObject.EffectDir = this.moveDirection; } }
public void ProcessInner(Action _action, Track _track, int delta) { if (this.MoveType == ActorMoveType.RotateBody) { int num = this.rotateBodyDegreeSpeed * delta / 1000; VInt3 vInt = this.moveActor.handle.forward.RotateY(-num); this.moveActor.handle.forward = vInt; this.moveActor.handle.rotation = Quaternion.LookRotation((Vector3)vInt); this.rotateBodyCurDirDegreeAngle += num; this.rotateBodyCurDirDegreeAngle %= 360; long nom = (long)((float)this.rotateBodyCurDirDegreeAngle * 0.0174532924f * 1000f); VFactor f; VFactor f2; IntMath.sincos(out f, out f2, nom, 1000L); this.destPosition.x = this.originateActor.handle.location.x + this.rotateBodyRadius * f2; this.destPosition.y = this.rotateBodyHeight; this.destPosition.z = this.originateActor.handle.location.z + this.rotateBodyRadius * f; this.moveDirection = this.destPosition - this.moveActor.handle.location; this.lerpDirection = this.moveDirection; this.moveActor.handle.location = this.destPosition; } else { VInt3 location = this.moveActor.handle.location; if (this.MoveType == ActorMoveType.Target && this.tarActor) { this.destPosition = this.tarActor.handle.location; if (this.tarActor && this.tarActor.handle.CharInfo != null) { CActorInfo charInfo = this.tarActor.handle.CharInfo; this.hitHeight = charInfo.iBulletHeight; VInt3 a = this.moveActor.handle.location - this.destPosition; a.y = 0; a = a.NormalizeTo(1000); this.destPosition += IntMath.Divide(a, (long)charInfo.iCollisionSize.x, 1000L); } this.destPosition.y = this.destPosition.y + this.hitHeight; } if (this.bMoveOnXAxis) { this.moveDirection = this.destPosition - this.zCurPosition; } else { this.moveDirection = this.destPosition - location; } this.lerpDirection = this.moveDirection; if (this.bMoveRotate && !this.bMoveOnXAxis) { this.RotateMoveBullet(this.moveDirection); } int num2; if (!this.shouldUseAcceleration) { num2 = this.velocity * delta / 1000; } else { long num3 = (long)this.lastVelocity * (long)delta + (long)this.acceleration * (long)delta * (long)delta / 2L / 1000L; num3 /= 1000L; num2 = (int)num3; this.lastVelocity += this.acceleration * delta / 1000; } if ((long)num2 * (long)num2 >= this.moveDirection.sqrMagnitudeLong2D && this.bReachDestStop) { int magnitude2D = (this.destPosition - this.moveActor.handle.location).magnitude2D; if (this.bMoveOnXAxis) { this.destPosition += this.xDestPosition; } this.moveActor.handle.location = this.destPosition; this.stopCondtion = true; if (this.moveActor.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Bullet) { BulletWrapper bulletWrapper = this.moveActor.handle.ActorControl as BulletWrapper; if (bulletWrapper != null && bulletWrapper.GetMoveCollisiong()) { bulletWrapper.SetMoveDelta(magnitude2D); } } } else { VInt3 vInt2; if (this.gravity < 0) { this.moveDirection.y = 0; vInt2 = location + this.moveDirection.NormalizeTo(num2); vInt2.y += this.gravityControler.GetMotionDeltaDistance(delta); VInt vInt3; if (PathfindingUtility.GetGroundY(this.destPosition, out vInt3) && vInt2.y < vInt3.i) { vInt2.y = vInt3.i; } } else { vInt2 = location + this.moveDirection.NormalizeTo(num2); } if (this.bMoveOnXAxis) { this.zCurPosition += this.moveDirection.NormalizeTo(num2); int motionDeltaDistance = this.xControler.GetMotionDeltaDistance(delta); VInt3 vInt4 = this.xDirection; vInt4.NormalizeTo(Math.Abs(motionDeltaDistance)); if (motionDeltaDistance < 0) { vInt4 = -vInt4; } vInt2 += vInt4; if (this.bMoveRotate) { VInt3 dir = vInt2 - location; this.RotateMoveBullet(dir); } } if (this.moveActor.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Bullet) { BulletWrapper bulletWrapper2 = this.moveActor.handle.ActorControl as BulletWrapper; if (bulletWrapper2 != null && bulletWrapper2.GetMoveCollisiong()) { bulletWrapper2.SetMoveDelta(num2); } } this.moveActor.handle.location = vInt2; } } SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (refParamObject != null) { refParamObject.EffectPos = this.moveActor.handle.location; refParamObject.EffectDir = this.moveDirection; } }
public override void Process(Action _action, Track _track) { if (MonoSingleton <Reconnection> .GetInstance().isProcessingRelayRecover) { return; } SkillUseContext skillUseContext = null; Vector3 vector = this.bindPosOffset; Quaternion quaternion = this.bindRotOffset; GameObject gameObject = _action.GetGameObject(this.targetId); GameObject gameObject2 = _action.GetGameObject(this.objectSpaceId); Transform transform = null; Transform transform2 = null; if (this.bindPointName.get_Length() == 0) { if (gameObject != null) { transform = gameObject.transform; } else if (gameObject2 != null) { transform2 = gameObject2.transform; } } else { Transform transform3 = null; if (gameObject != null) { GameObject gameObject3 = SubObject.FindSubObject(gameObject, this.bindPointName); if (gameObject3 != null) { transform3 = gameObject3.transform; } if (transform3 != null) { transform = transform3; } else if (gameObject != null) { transform = gameObject.transform; } } else if (gameObject2 != null) { GameObject gameObject3 = SubObject.FindSubObject(gameObject2, this.bindPointName); if (gameObject3 != null) { transform3 = gameObject3.transform; } if (transform3 != null) { transform2 = transform3; } else if (gameObject != null) { transform2 = gameObject2.transform; } } } if (this.bBulletPos) { VInt3 zero = VInt3.zero; _action.refParams.GetRefParam("_BulletPos", ref zero); vector = (Vector3)zero; quaternion = Quaternion.identity; if (this.bBulletDir) { VInt3 zero2 = VInt3.zero; if (_action.refParams.GetRefParam("_BulletDir", ref zero2)) { quaternion = Quaternion.LookRotation((Vector3)zero2); } } } else if (transform != null) { vector = transform.localToWorldMatrix.MultiplyPoint(this.bindPosOffset); quaternion = transform.rotation * this.bindRotOffset; } else if (transform2 != null) { if (gameObject2 != null) { PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.objectSpaceId); if (actorHandle) { vector = (Vector3)IntMath.Transform((VInt3)this.bindPosOffset, actorHandle.get_handle().forward, actorHandle.get_handle().location); quaternion = Quaternion.LookRotation((Vector3)actorHandle.get_handle().forward) * this.bindRotOffset; } } else { vector = transform2.localToWorldMatrix.MultiplyPoint(this.bindPosOffset); quaternion = transform2.rotation * this.bindRotOffset; } if (this.bBulletDir) { VInt3 zero3 = VInt3.zero; if (_action.refParams.GetRefParam("_BulletDir", ref zero3)) { quaternion = Quaternion.LookRotation((Vector3)zero3); quaternion *= this.bindRotOffset; } } else if (this.bBullerPosDir) { skillUseContext = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (skillUseContext != null) { PoolObjHandle <ActorRoot> originator = skillUseContext.Originator; if (originator) { Vector3 a = transform2.position; if (gameObject2 != null) { PoolObjHandle <ActorRoot> actorHandle2 = _action.GetActorHandle(this.objectSpaceId); if (actorHandle2) { a = (Vector3)actorHandle2.get_handle().location; } } Vector3 forward = a - (Vector3)originator.get_handle().location; quaternion = Quaternion.LookRotation(forward); quaternion *= this.bindRotOffset; } } } } if (this.bEnableOptCull && transform2 && transform2.gameObject.layer == LayerMask.NameToLayer("Hide") && !FogOfWar.enable) { return; } if (this.bEnableOptCull && MonoSingleton <GlobalConfig> .get_instance().bEnableParticleCullOptimize&& !MonoSingleton <CameraSystem> .get_instance().CheckVisiblity(new Bounds(vector, new Vector3((float)this.extend, (float)this.extend, (float)this.extend)))) { return; } bool flag = false; string prefabName; if (this.bUseSkin) { prefabName = SkinResourceHelper.GetResourceName(_action, this.resourceName, this.bUseSkinAdvance); } else { prefabName = this.resourceName; } if (skillUseContext == null) { skillUseContext = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); } bool flag2 = true; int particleLOD = GameSettings.ParticleLOD; if (GameSettings.DynamicParticleLOD) { if (skillUseContext != null && skillUseContext.Originator && skillUseContext.Originator.get_handle().TheActorMeta.PlayerId == Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer().PlayerId) { flag2 = false; } if (!flag2 && particleLOD > 1) { GameSettings.ParticleLOD = 1; } MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = flag2; } this.particleObject = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(prefabName, true, SceneObjType.ActionRes, vector, quaternion, out flag); if (GameSettings.DynamicParticleLOD) { MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = false; } if (this.particleObject == null) { if (GameSettings.DynamicParticleLOD) { MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = flag2; } this.particleObject = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(this.resourceName, true, SceneObjType.ActionRes, vector, quaternion, out flag); if (GameSettings.DynamicParticleLOD) { MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = false; } if (this.particleObject == null) { if (GameSettings.DynamicParticleLOD) { GameSettings.ParticleLOD = particleLOD; } return; } } if (GameSettings.DynamicParticleLOD) { GameSettings.ParticleLOD = particleLOD; } if (!this.particleObject) { return; } ParticleHelper.IncParticleActiveNumber(); if (transform != null) { PoolObjHandle <ActorRoot> poolObjHandle = (!(transform.gameObject == gameObject)) ? ActorHelper.GetActorRoot(transform.gameObject) : _action.GetActorHandle(this.targetId); if (poolObjHandle && poolObjHandle.get_handle().ActorMesh) { this.particleObject.transform.parent = poolObjHandle.get_handle().ActorMesh.transform; } else { this.particleObject.transform.parent = transform.parent; if (poolObjHandle && poolObjHandle.get_handle().TheActorMeta.ActorCamp != Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().PlayerCamp&& FogOfWar.enable) { if (poolObjHandle.get_handle().HorizonMarker != null) { poolObjHandle.get_handle().HorizonMarker.AddSubParObj(this.particleObject); } else { BulletWrapper bulletWrapper = poolObjHandle.get_handle().ActorControl as BulletWrapper; if (bulletWrapper != null) { bulletWrapper.AddSubParObj(this.particleObject); } } } } } string text = "Particles"; if (transform && transform.gameObject.layer == LayerMask.NameToLayer("Hide")) { text = "Hide"; } if (transform == null && transform2 != null && FogOfWar.enable) { PoolObjHandle <ActorRoot> actorRoot = ActorHelper.GetActorRoot(transform2.gameObject); if (actorRoot && actorRoot.get_handle().TheActorMeta.ActorCamp != Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().PlayerCamp) { if (transform2.gameObject.layer == LayerMask.NameToLayer("Hide")) { text = "Hide"; } PoolObjHandle <ActorRoot> actorHandle3 = _action.GetActorHandle(this.VirtualAttachBulletId); Singleton <GameFowManager> .get_instance().m_collector.AddVirtualParentParticle(this.particleObject, actorHandle3, this.bUseAttachBulletShape); } } MMGame_Math.SetLayer(this.particleObject, text, false); if (flag) { ParticleHelper.Init(this.particleObject, this.scaling); } Singleton <CGameObjectPool> .GetInstance().RecycleGameObjectDelay(this.particleObject, Mathf.Max(_action.length, (int)(this.lifeTime * 1000f)), new CGameObjectPool.OnDelayRecycleDelegate(TriggerParticleTick.OnRecycleTickObj)); if (this.applyActionSpeedToParticle && this.particleObject != null) { _action.AddTempObject(Action.PlaySpeedAffectedType.ePSAT_Fx, this.particleObject); } }
public void UpdateFowVisibility(bool bForce) { GameObjMgr instance = Singleton <GameObjMgr> .instance; GameFowManager instance2 = Singleton <GameFowManager> .instance; COM_PLAYERCAMP horizonCamp = Singleton <WatchController> .instance.HorizonCamp; uint num = Singleton <FrameSynchr> .instance.CurFrameNum % instance2.InterpolateFrameInterval; uint num2 = Singleton <FrameSynchr> .instance.CurFrameNum % instance2.InterpolateFrameIntervalBullet(true); uint num3 = Singleton <FrameSynchr> .instance.CurFrameNum % instance2.InterpolateFrameIntervalBullet(false); uint num4 = Singleton <FrameSynchr> .instance.CurFrameNum % instance2.InterpolateFrameIntervalHero; List <PoolObjHandle <ActorRoot> > gameActors = instance.GameActors; int count = gameActors.get_Count(); for (int i = 0; i < count; i++) { if (gameActors.get_Item(i)) { ActorRoot handle = gameActors.get_Item(i).handle; ActorTypeDef actorType = handle.TheActorMeta.ActorType; if (actorType == ActorTypeDef.Actor_Type_Hero) { if (handle.ObjID % instance2.InterpolateFrameIntervalHero != num4 && !bForce) { goto IL_219; } } else { if (handle.ObjID % instance2.InterpolateFrameInterval != num && !bForce) { goto IL_219; } if (handle.ActorControl.IsDeadState && !handle.TheStaticData.TheBaseAttribute.DeadControl) { goto IL_219; } } if (actorType != ActorTypeDef.Actor_Type_Organ) { VInt3 worldLoc = new VInt3(handle.location.x, handle.location.z, 0); if (actorType == ActorTypeDef.Actor_Type_Hero || actorType == ActorTypeDef.Actor_Type_Monster) { bool flag = instance2.QueryAttr(handle.location) == FieldObj.EViewBlockType.Grass; handle.HorizonMarker.SetTranslucentMark(HorizonConfig.HideMark.Jungle, flag, false); if (handle.HudControl != null && handle.HudControl.HasStatus(StatusHudType.InJungle) != flag) { if (flag) { handle.HudControl.ShowStatus(StatusHudType.InJungle); } else { handle.HudControl.HideStatus(StatusHudType.InJungle); } } } for (int j = 1; j < 3; j++) { COM_PLAYERCAMP cOM_PLAYERCAMP = (COM_PLAYERCAMP)j; if (cOM_PLAYERCAMP != handle.TheActorMeta.ActorCamp) { handle.HorizonMarker.SetHideMark(cOM_PLAYERCAMP, HorizonConfig.HideMark.Jungle, !instance2.IsSurfaceCellVisibleConsiderNeighbor(worldLoc, cOM_PLAYERCAMP)); } } } } IL_219 :; } Dictionary <int, ShenFuObjects> .Enumerator enumerator = Singleton <ShenFuSystem> .instance._shenFuTriggerPool.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <int, ShenFuObjects> current = enumerator.get_Current(); int key = current.get_Key(); if ((long)key % (long)((ulong)instance2.InterpolateFrameInterval) == (long)((ulong)num)) { KeyValuePair <int, ShenFuObjects> current2 = enumerator.get_Current(); GameObject shenFu = current2.get_Value().ShenFu; GameFowCollector.SetObjVisibleByFow(new PoolObjHandle <ActorRoot>(null), shenFu, instance2, horizonCamp); } } for (int k = 0; k < 3; k++) { if (Singleton <WatchController> .instance.IsWatching || k != (int)horizonCamp) { List <PoolObjHandle <ActorRoot> > campBullet = instance.GetCampBullet((COM_PLAYERCAMP)k); int count2 = campBullet.get_Count(); for (int l = 0; l < count2; l++) { PoolObjHandle <ActorRoot> poolObjHandle = campBullet.get_Item(l); if (poolObjHandle) { ActorRoot handle2 = poolObjHandle.handle; BulletWrapper bulletWrapper = handle2.ActorControl as BulletWrapper; if (bulletWrapper.m_bVisibleByFow) { bool flag2; if (bulletWrapper.GetMoveDelta() > 0) { flag2 = (handle2.ObjID % instance2.InterpolateFrameIntervalBullet(true) != num2); } else { flag2 = (handle2.ObjID % instance2.InterpolateFrameIntervalBullet(false) != num3); } if (!flag2) { if (Singleton <WatchController> .instance.IsWatching && Singleton <WatchController> .instance.CoversCamp(bulletWrapper.actor.TheActorMeta.ActorCamp)) { bulletWrapper.UpdateSubParObjVisibility(true); } else if (bulletWrapper.m_bVisibleByShape) { bulletWrapper.UpdateSubParObjVisibility(GameFowCollector.SetObjWithColVisibleByFow(poolObjHandle, instance2, horizonCamp)); } else { bulletWrapper.UpdateSubParObjVisibility(GameFowCollector.SetObjVisibleByFow(poolObjHandle, handle2.gameObject, instance2, horizonCamp)); } } } } } } } int count3 = this.VirtualParentParticles_.get_Count(); for (int m = 0; m < count3; m++) { GameFowCollector.VirtualParticleAttachContext virtualParticleAttachContext = this.VirtualParentParticles_.get_Item(m); GameObject virtualParticle = this.VirtualParentParticles_.get_Item(m).VirtualParticle; if (!(virtualParticle == null) && this.VirtualParentParticles_.get_Item(m).AttachActor) { if (this.VirtualParentParticles_.get_Item(m).AttachActor.handle.Visible) { virtualParticle.SetLayer("Actor", "Particles", true); } else { virtualParticle.SetLayer("Hide", true); } } } }
public void CollectExplorer(bool bForce) { GameObjMgr instance = Singleton <GameObjMgr> .instance; GameFowManager instance2 = Singleton <GameFowManager> .instance; uint num = Singleton <FrameSynchr> .instance.CurFrameNum % instance2.InterpolateFrameInterval; uint num2 = Singleton <FrameSynchr> .instance.CurFrameNum % instance2.InterpolateFrameIntervalBullet(true); uint num3 = Singleton <FrameSynchr> .instance.CurFrameNum % instance2.InterpolateFrameIntervalBullet(false); uint num4 = Singleton <FrameSynchr> .instance.CurFrameNum % instance2.InterpolateFrameIntervalHero; this.ClearExplorerPosList(); int count = instance.GameActors.get_Count(); for (int i = 0; i < count; i++) { PoolObjHandle <ActorRoot> ptr = instance.GameActors.get_Item(i); if (ptr) { ActorRoot handle = ptr.handle; ActorTypeDef actorType = handle.TheActorMeta.ActorType; if (actorType == ActorTypeDef.Actor_Type_Hero) { if (handle.ObjID % instance2.InterpolateFrameIntervalHero != num4 && !bForce) { goto IL_191; } } else if (handle.ObjID % instance2.InterpolateFrameInterval != num && !bForce) { goto IL_191; } if (actorType != ActorTypeDef.Actor_Type_Organ && (!handle.ActorControl.IsDeadState || handle.TheStaticData.TheBaseAttribute.DeadControl)) { VInt3 vInt = new VInt3(handle.location.x, handle.location.z, 0); if (handle.HorizonMarker != null) { int[] exposedCamps = handle.HorizonMarker.GetExposedCamps(); ACTOR_INFO aCTOR_INFO = ClassObjPool <ACTOR_INFO> .Get(); aCTOR_INFO.camps = exposedCamps; aCTOR_INFO.location = handle.HorizonMarker.GetExposedPos(); this.m_explorerPosList.Add(aCTOR_INFO); } } } IL_191 :; } this.ClearExplorerBulletList(); for (int j = 1; j < 3; j++) { List <PoolObjHandle <ActorRoot> > campBullet = Singleton <GameObjMgr> .instance.GetCampBullet((COM_PLAYERCAMP)j); int count2 = campBullet.get_Count(); for (int k = 0; k < count2; k++) { PoolObjHandle <ActorRoot> ptr2 = campBullet.get_Item(k); if (ptr2) { ActorRoot handle2 = ptr2.handle; BulletWrapper bulletWrapper = handle2.ActorControl as BulletWrapper; if (0 < bulletWrapper.SightRadius) { if (!bForce) { if (bulletWrapper.GetMoveDelta() > 0) { if (handle2.ObjID % instance2.InterpolateFrameIntervalBullet(true) != num2) { goto IL_2AD; } } else if (handle2.ObjID % instance2.InterpolateFrameIntervalBullet(false) != num3) { goto IL_2AD; } } VInt3 location = new VInt3(handle2.location.x, handle2.location.z, 0); BULLET_INFO bULLET_INFO = ClassObjPool <BULLET_INFO> .Get(); bULLET_INFO.radius = bulletWrapper.SightRange; bULLET_INFO.location = location; this.m_explorerBulletList[j - 1].Add(bULLET_INFO); } } IL_2AD :; } } }
public override void Process(Action _action, Track _track) { if (MonoSingleton <Reconnection> .GetInstance().isProcessingRelayRecover) { return; } SkillUseContext skillUseContext = null; Vector3 vector = this.bindPosOffset; Quaternion quaternion = this.bindRotOffset; GameObject gameObject = _action.GetGameObject(this.targetId); GameObject gameObject2 = _action.GetGameObject(this.objectSpaceId); Transform transform = null; Transform transform2 = null; if (this.bindPointName.get_Length() == 0) { if (gameObject != null) { transform = gameObject.transform; } else if (gameObject2 != null) { transform2 = gameObject2.transform; } } else { Transform transform3 = null; if (gameObject != null) { GameObject gameObject3 = SubObject.FindSubObject(gameObject, this.bindPointName); if (gameObject3 != null) { transform3 = gameObject3.transform; } if (transform3 != null) { transform = transform3; } else if (gameObject != null) { transform = gameObject.transform; } } else if (gameObject2 != null) { GameObject gameObject4 = SubObject.FindSubObject(gameObject2, this.bindPointName); if (gameObject4 != null) { transform3 = gameObject4.transform; } if (transform3 != null) { transform2 = transform3; } else if (gameObject != null) { transform2 = gameObject2.transform; } } } if (this.bBulletPos) { VInt3 zero = VInt3.zero; _action.refParams.GetRefParam("_BulletPos", ref zero); vector = (Vector3)zero; quaternion = Quaternion.identity; if (this.bBulletDir) { VInt3 zero2 = VInt3.zero; if (_action.refParams.GetRefParam("_BulletDir", ref zero2)) { quaternion = Quaternion.LookRotation((Vector3)zero2); } } } else if (transform != null) { vector = transform.localToWorldMatrix.MultiplyPoint(this.bindPosOffset); quaternion = transform.rotation * this.bindRotOffset; } else if (transform2 != null) { if (gameObject2 != null) { PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.objectSpaceId); if (actorHandle) { vector = (Vector3)IntMath.Transform((VInt3)this.bindPosOffset, actorHandle.handle.forward, actorHandle.handle.location); quaternion = Quaternion.LookRotation((Vector3)actorHandle.handle.forward) * this.bindRotOffset; } } else { vector = transform2.localToWorldMatrix.MultiplyPoint(this.bindPosOffset); quaternion = transform2.rotation * this.bindRotOffset; } if (this.bBulletDir) { VInt3 zero3 = VInt3.zero; if (_action.refParams.GetRefParam("_BulletDir", ref zero3)) { quaternion = Quaternion.LookRotation((Vector3)zero3); quaternion *= this.bindRotOffset; } } else if (this.bBullerPosDir) { skillUseContext = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (skillUseContext != null) { PoolObjHandle <ActorRoot> originator = skillUseContext.Originator; if (originator) { Vector3 a = transform2.position; if (gameObject2 != null) { PoolObjHandle <ActorRoot> actorHandle2 = _action.GetActorHandle(this.objectSpaceId); if (actorHandle2) { a = (Vector3)actorHandle2.handle.location; } } Vector3 forward = a - (Vector3)originator.handle.location; quaternion = Quaternion.LookRotation(forward); quaternion *= this.bindRotOffset; } } } } if (this.bUseIndicatorDir) { skillUseContext = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (skillUseContext != null) { PoolObjHandle <ActorRoot> originator2 = skillUseContext.Originator; VInt3 ob; if (originator2 && skillUseContext.CalcAttackerDir(out ob, originator2)) { quaternion = Quaternion.LookRotation((Vector3)ob); quaternion *= this.bindRotOffset; } } } if (this.bEnableOptCull && transform2 && transform2.gameObject.layer == LayerMask.NameToLayer("Hide") && !FogOfWar.enable) { return; } if (this.bEnableOptCull && MonoSingleton <GlobalConfig> .instance.bEnableParticleCullOptimize && !MonoSingleton <CameraSystem> .instance.CheckVisiblity(new Bounds(vector, new Vector3((float)this.extend, (float)this.extend, (float)this.extend)))) { return; } bool flag = false; string prefabName; if (this.bUseSkin) { prefabName = SkinResourceHelper.GetResourceName(_action, this.resourceName, this.bUseSkinAdvance); } else { prefabName = this.resourceName; } if (skillUseContext == null) { skillUseContext = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); } bool flag2 = true; int particleLOD = GameSettings.ParticleLOD; if (GameSettings.DynamicParticleLOD) { if (skillUseContext != null && skillUseContext.Originator && skillUseContext.Originator.handle.TheActorMeta.PlayerId == Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer().PlayerId) { flag2 = false; } if (!flag2 && particleLOD > 1) { GameSettings.ParticleLOD = 1; } MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = flag2; } this.particleObject = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(prefabName, true, SceneObjType.ActionRes, vector, quaternion, out flag); if (GameSettings.DynamicParticleLOD) { MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = false; } if (this.particleObject == null) { if (GameSettings.DynamicParticleLOD) { MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = flag2; } this.particleObject = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(this.resourceName, true, SceneObjType.ActionRes, vector, quaternion, out flag); if (GameSettings.DynamicParticleLOD) { MonoSingleton <SceneMgr> .GetInstance().m_dynamicLOD = false; } if (this.particleObject == null) { if (GameSettings.DynamicParticleLOD) { GameSettings.ParticleLOD = particleLOD; } return; } } if (GameSettings.DynamicParticleLOD) { GameSettings.ParticleLOD = particleLOD; } if (!this.particleObject) { return; } if (this.particleScaleGrow > 0 && skillUseContext != null && skillUseContext.Originator) { SkillSlot skillSlot; skillUseContext.Originator.handle.SkillControl.TryGetSkillSlot(skillUseContext.SlotType, out skillSlot); if (skillSlot != null) { int num = skillSlot.GetSkillLevel(); BaseSkill refParamObject = _action.refParams.GetRefParamObject <BaseSkill>("SkillObj"); if (refParamObject != null) { BuffSkill buffSkill = refParamObject.isBuff ? ((BuffSkill)refParamObject) : null; if (buffSkill != null) { byte b = buffSkill.cfgData.bGrowthType; b %= 10; if (b > 0 && (SkillSlotType)b != skillUseContext.SlotType + 1) { SSkillFuncContext sSkillFuncContext = default(SSkillFuncContext); sSkillFuncContext.inOriginator = skillUseContext.Originator; sSkillFuncContext.inBuffSkill = new PoolObjHandle <BuffSkill>(buffSkill); sSkillFuncContext.inTargetObj = skillUseContext.TargetActor; sSkillFuncContext.inUseContext = skillUseContext; num = sSkillFuncContext.iSkillLevel; } } } this.particleSystem = this.particleObject.GetComponentsInChildren <ParticleSystem>(true); this.particleSystemSize = new float[this.particleSystem.Length]; for (int i = 0; i < this.particleSystem.Length; i++) { this.particleSystemSize[i] = this.particleSystem[i].startSize; } for (int j = 0; j < this.particleSystem.Length; j++) { this.particleSystem[j].startSize = this.particleSystemSize[j] * ((float)((num - 1) * this.particleScaleGrow) / 10000f + 1f); } this.particleMeshRender = this.particleObject.GetComponentsInChildren <MeshRenderer>(true); this.particleMeshRenderScale = new Vector3[this.particleMeshRender.Length]; for (int k = 0; k < this.particleMeshRender.Length; k++) { this.particleMeshRenderScale[k] = this.particleMeshRender[k].transform.localScale; } for (int l = 0; l < this.particleMeshRender.Length; l++) { this.particleMeshRender[l].transform.localScale = this.particleMeshRenderScale[l] * ((float)((num - 1) * this.particleScaleGrow) / 10000f + 1f); } } } ParticleHelper.IncParticleActiveNumber(); if (transform != null) { PoolObjHandle <ActorRoot> ptr = (transform.gameObject == gameObject) ? _action.GetActorHandle(this.targetId) : ActorHelper.GetActorRoot(transform.gameObject); if (ptr && ptr.handle.ActorMesh) { this.particleObject.transform.parent = ptr.handle.ActorMesh.transform; } else { this.particleObject.transform.parent = transform.parent; if (ptr && FogOfWar.enable && (Singleton <WatchController> .instance.IsWatching || !Singleton <WatchController> .instance.CoversCamp(ptr.handle.TheActorMeta.ActorCamp))) { if (ptr.handle.HorizonMarker != null) { ptr.handle.HorizonMarker.AddSubParObj(this.particleObject); } else { BulletWrapper bulletWrapper = ptr.handle.ActorControl as BulletWrapper; if (bulletWrapper != null) { bulletWrapper.AddSubParObj(this.particleObject); } } } } } string layerName = "Particles"; if (transform && transform.gameObject.layer == LayerMask.NameToLayer("Hide")) { layerName = "Hide"; } if (transform == null && transform2 != null && FogOfWar.enable) { PoolObjHandle <ActorRoot> actorRoot = ActorHelper.GetActorRoot(transform2.gameObject); if (actorRoot) { if (transform2.gameObject.layer == LayerMask.NameToLayer("Hide")) { layerName = "Hide"; } PoolObjHandle <ActorRoot> actorHandle3 = _action.GetActorHandle(this.VirtualAttachBulletId); Singleton <GameFowManager> .instance.m_collector.AddVirtualParentParticle(this.particleObject, actorHandle3); } } this.particleObject.SetLayer(layerName, false); if (flag) { ParticleHelper.Init(this.particleObject, this.scaling); } Singleton <CGameObjectPool> .GetInstance().RecycleGameObjectDelay(this.particleObject, Mathf.Max(_action.length, (int)(this.lifeTime * 1000f)), new CGameObjectPool.OnDelayRecycleDelegate(TriggerParticleTick.OnRecycleTickObj), this.particleSystemSize, this.particleMeshRenderScale); if (this.applyActionSpeedToParticle && this.particleObject != null) { _action.AddTempObject(Action.PlaySpeedAffectedType.ePSAT_Fx, this.particleObject); } }
public void UpdateFowVisibility(bool bForce) { GameObjMgr instance = Singleton <GameObjMgr> .get_instance(); GameFowManager instance2 = Singleton <GameFowManager> .get_instance(); Player hostPlayer = Singleton <GamePlayerCenter> .get_instance().GetHostPlayer(); COM_PLAYERCAMP playerCamp = hostPlayer.PlayerCamp; uint num = Singleton <FrameSynchr> .get_instance().CurFrameNum % instance2.InterpolateFrameInterval; uint num2 = Singleton <FrameSynchr> .get_instance().CurFrameNum % instance2.InterpolateFrameIntervalBullet; uint num3 = Singleton <FrameSynchr> .get_instance().CurFrameNum % instance2.InterpolateFrameIntervalHero; List <PoolObjHandle <ActorRoot> > gameActors = instance.GameActors; int count = gameActors.get_Count(); for (int i = 0; i < count; i++) { if (gameActors.get_Item(i)) { ActorRoot handle = gameActors.get_Item(i).get_handle(); ActorTypeDef actorType = handle.TheActorMeta.ActorType; if (actorType == ActorTypeDef.Actor_Type_Hero) { if (handle.ObjID % instance2.InterpolateFrameIntervalHero != num3 && !bForce) { goto IL_212; } } else if (handle.ObjID % instance2.InterpolateFrameInterval != num && !bForce) { goto IL_212; } if (actorType != ActorTypeDef.Actor_Type_Organ && (!handle.ActorControl.IsDeadState || handle.TheStaticData.TheBaseAttribute.DeadControl)) { VInt3 worldLoc = new VInt3(handle.location.x, handle.location.z, 0); if (actorType == ActorTypeDef.Actor_Type_Hero || actorType == ActorTypeDef.Actor_Type_Monster) { bool flag = instance2.QueryAttr(handle.location) == FieldObj.EViewBlockType.Grass; handle.HorizonMarker.SetTranslucentMark(HorizonConfig.HideMark.Jungle, flag, false); if (handle.HudControl != null && handle.HudControl.HasStatus(StatusHudType.InJungle) != flag) { if (flag) { handle.HudControl.ShowStatus(StatusHudType.InJungle); } else { handle.HudControl.HideStatus(StatusHudType.InJungle); } } } for (int j = 1; j < 3; j++) { COM_PLAYERCAMP cOM_PLAYERCAMP = j; if (cOM_PLAYERCAMP != handle.TheActorMeta.ActorCamp) { handle.HorizonMarker.SetHideMark(cOM_PLAYERCAMP, HorizonConfig.HideMark.Jungle, !instance2.IsSurfaceCellVisibleConsiderNeighbor(worldLoc, cOM_PLAYERCAMP)); } } } } IL_212 :; } Dictionary <int, ShenFuObjects> .Enumerator enumerator = Singleton <ShenFuSystem> .get_instance()._shenFuTriggerPool.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <int, ShenFuObjects> current = enumerator.get_Current(); int key = current.get_Key(); if ((long)key % (long)((ulong)instance2.InterpolateFrameInterval) == (long)((ulong)num)) { KeyValuePair <int, ShenFuObjects> current2 = enumerator.get_Current(); GameObject shenFu = current2.get_Value().ShenFu; GameFowCollector.SetObjVisibleByFow(shenFu, instance2, playerCamp); } } for (int k = 0; k < 3; k++) { if (k != playerCamp) { List <PoolObjHandle <ActorRoot> > campBullet = instance.GetCampBullet(k); int count2 = campBullet.get_Count(); for (int l = 0; l < count2; l++) { PoolObjHandle <ActorRoot> poolObjHandle = campBullet.get_Item(l); if (poolObjHandle) { ActorRoot handle2 = poolObjHandle.get_handle(); BulletWrapper bulletWrapper = handle2.ActorControl as BulletWrapper; if (bulletWrapper.m_bVisibleByFow) { if (handle2.ObjID % instance2.InterpolateFrameIntervalBullet == num2) { if (bulletWrapper.m_bVisibleByShape) { bulletWrapper.UpdateSubParObjVisibility(GameFowCollector.SetObjWithColVisibleByFow(poolObjHandle, instance2, playerCamp)); } else { bulletWrapper.UpdateSubParObjVisibility(GameFowCollector.SetObjVisibleByFow(handle2.gameObject, instance2, playerCamp)); } } } } } } } int count3 = this.VirtualParentParticles_.get_Count(); for (int m = 0; m < count3; m++) { GameFowCollector.VirtualParticleAttachContext virtualParticleAttachContext = this.VirtualParentParticles_.get_Item(m); GameObject virtualParticle = this.VirtualParentParticles_.get_Item(m).VirtualParticle; if (!(virtualParticle == null)) { int num4 = virtualParticle.GetInstanceID(); if (num4 < 0) { num4 = -num4; } if ((long)num4 % (long)((ulong)instance2.InterpolateFrameIntervalBullet) == (long)((ulong)num)) { if (virtualParticleAttachContext.bUseShape) { GameFowCollector.SetObjWithColVisibleByFowAttached(virtualParticle, instance2, playerCamp, this.VirtualParentParticles_.get_Item(m).AttachActor); } else { GameFowCollector.SetObjVisibleByFowAttached(virtualParticle, instance2, playerCamp, this.VirtualParentParticles_.get_Item(m).AttachActor); } } } } }