Exemple #1
0
        private void SetRandomDirectionWithWallcheck(Vector3 charDirection)
        {
            int     num  = Mathf.FloorToInt((this.randAngelMax - this.randAngelMin) / 12f);
            float   num2 = -1f;
            Vector3 zero = Vector3.zero;
            float   num3 = (this.randAngelMax <= this.randAngelMin) ? this.randAngelMax : this.randAngelMin;

            for (int i = 0; i < num; i++)
            {
                Vector3 forward = (Vector3)(Quaternion.AngleAxis(num3 + (i * 12f), Vector3.up) * charDirection);
                float   num5    = CollisionDetectPattern.GetRaycastDistance(base._aiEntity.RootNodePosition, forward, 10f, 0.5f, InLevelData.STAGE_COLLIDER_LAYER);
                if (num5 > num2)
                {
                    num2 = num5;
                    zero = forward;
                }
            }
            if (num2 == 10f)
            {
                zero = (Vector3)(Quaternion.AngleAxis(UnityEngine.Random.Range(this.randAngelMin, this.randAngelMax), Vector3.up) * charDirection);
            }
            this._toDirection   = zero;
            this._toDirection.y = 0f;
            this._toDirection.Normalize();
        }
Exemple #2
0
        public static void CylinderCollisionDetectAttack(string attackName, ConfigEntityAttackPattern patternConfig, IAttacker attacker, LayerMask layerMask)
        {
            CylinderCollisionDetect detect = (CylinderCollisionDetect)patternConfig;
            Vector3 cylinderCenterPoint    = attacker.XZPosition + ((Vector3)(attacker.FaceDirection * detect.CenterZOffset));
            List <CollisionResult> results = CollisionDetectPattern.CylinderCollisionDetectBySphere(attacker.XZPosition, cylinderCenterPoint, detect.Radius, detect.Height, layerMask);

            TestAndActHit(attackName, patternConfig, attacker, results);
        }
Exemple #3
0
        public static void RectCollisionDetectAttack(string attackName, ConfigEntityAttackPattern patternConfig, IAttacker attacker, LayerMask layerMask)
        {
            RectCollisionDetect    detect         = (RectCollisionDetect)patternConfig;
            Vector3                recCenterPoint = new Vector3(attacker.XZPosition.x, attacker.XZPosition.y + detect.CenterYOffset, attacker.XZPosition.z);
            List <CollisionResult> results        = CollisionDetectPattern.RectCollisionDetectByRay(recCenterPoint, detect.OffsetZ, attacker.FaceDirection, detect.Width, detect.Distance, layerMask);

            TestAndActHit(attackName, patternConfig, attacker, results);
        }
Exemple #4
0
        public static void FanCollisionDetectAttack(string attackName, ConfigEntityAttackPattern patternConfig, IAttacker attacker, LayerMask layerMask)
        {
            FanCollisionDetect     detect         = (FanCollisionDetect)patternConfig;
            Vector3                fanCenterPoint = new Vector3(attacker.XZPosition.x, (attacker.XZPosition.y + detect.CenterYOffset) + (!detect.FollowRootNodeY ? 0f : attacker.GetAttachPoint("RootNode").transform.position.y), attacker.XZPosition.z);
            List <CollisionResult> results        = CollisionDetectPattern.MeleeFanCollisionDetectBySphere(fanCenterPoint, detect.OffsetZ, attacker.FaceDirection, detect.Radius * (1f + attacker.Evaluate(detect.RadiusRatio)), detect.FanAngle, detect.MeleeRadius, detect.MeleeFanAngle, layerMask);

            TestAndActHit(attackName, patternConfig, attacker, results);
        }
        private void KillBlackHole(bool doExplodeHit)
        {
            if ((this._fieldActor != null) && (this._fieldActor.triggerField != null))
            {
                List <uint> insideRuntimeIDs = this._fieldActor.GetInsideRuntimeIDs();
                this._fieldActor.triggerField.transform.position.y = 1f;
                for (int i = 0; i < insideRuntimeIDs.Count; i++)
                {
                    uint             runtimeID = insideRuntimeIDs[i];
                    BaseAbilityActor actor     = Singleton <EventManager> .Instance.GetActor <BaseAbilityActor>(runtimeID);

                    if (((actor != null) && (actor.gameObject != null)) && ((this.config.ModifierNames != null) && (this.config.ModifierNames.Length > 0)))
                    {
                        int index  = 0;
                        int length = this.config.ModifierNames.Length;
                        while (index < length)
                        {
                            if (actor.abilityPlugin != null)
                            {
                                actor.abilityPlugin.TryRemoveModifier(base.instancedAbility, this.config.ModifierNames[index]);
                            }
                            index++;
                        }
                    }
                }
                if (doExplodeHit && (this.config.ExplodeAnimEventID != null))
                {
                    List <CollisionResult> list2 = CollisionDetectPattern.CylinderCollisionDetectBySphere(this._fieldActor.triggerField.XZPosition, this._fieldActor.triggerField.XZPosition, base.instancedAbility.Evaluate(this.config.Radius), 2f, Singleton <EventManager> .Instance.GetAbilityHitboxTargettingMask(base.actor.runtimeID, MixinTargetting.Enemy));
                    for (int j = 0; j < list2.Count; j++)
                    {
                        CollisionResult result = list2[j];
                        BaseMonoEntity  collisionResultEntity = AttackPattern.GetCollisionResultEntity(result.entity);
                        if (collisionResultEntity != null)
                        {
                            Singleton <EventManager> .Instance.FireEvent(new EvtHittingOther(base.actor.runtimeID, collisionResultEntity.GetRuntimeID(), this.config.ExplodeAnimEventID, result.hitPoint, result.hitForward), MPEventDispatchMode.Normal);
                        }
                    }
                }
                base.FireMixinEffect(this.config.DestroyEffect, this._fieldActor.triggerField, false);
                this._fieldActor.Kill();
                this._blackHoleTimer.timespan = base.instancedAbility.Evaluate(this.config.Duration);
                this._blackHoleTimer.Reset(false);
                if ((this.config.CreationEffect != null) && (this.config.CreationEffect.EffectPattern != null))
                {
                    Singleton <EffectManager> .Instance.SetDestroyIndexedEffectPattern(this._blackHoleEffectIx);
                }
                foreach (KeyValuePair <BaseAbilityActor, int> pair in this._addedVelocityActorsAndIndexDic)
                {
                    if ((pair.Key != null) && (pair.Key.entity != null))
                    {
                        pair.Key.entity.SetAdditiveVelocityOfIndex(Vector3.zero, pair.Value);
                        pair.Key.entity.SetHasAdditiveVelocity(false);
                    }
                }
                this._addedVelocityActorsAndIndexDic.Clear();
            }
        }
        public override void OnAbilityTriggered(EvtAbilityStart evt)
        {
            Vector3 vector;

            if (this._blackHoleTimer.isActive)
            {
                this.KillBlackHole(true);
            }
            BaseMonoEntity entity = null;

            if (evt.otherID != 0)
            {
                BaseAbilityActor actor = Singleton <EventManager> .Instance.GetActor <BaseAbilityActor>(evt.otherID);

                if ((actor != null) && (actor.entity != null))
                {
                    entity = actor.entity;
                }
            }
            if (entity != null)
            {
                vector = entity.XZPosition + new Vector3(0f, 0.5f, 0f);
            }
            else
            {
                Vector3 origin = base.entity.XZPosition + new Vector3(0f, 0.5f, 0f);
                vector = CollisionDetectPattern.GetRaycastPoint(origin, base.entity.transform.forward, base.instancedAbility.Evaluate(this.config.CreationZOffset), 0.2f, ((int)1) << InLevelData.STAGE_COLLIDER_LAYER);
            }
            this._fieldActor = Singleton <DynamicObjectManager> .Instance.CreateAbilityTriggerField(vector, base.entity.transform.forward, base.actor, base.instancedAbility.Evaluate(this.config.Radius), MixinTargetting.Enemy, Singleton <DynamicObjectManager> .Instance.GetNextSyncedDynamicObjectRuntimeID(), false);

            if ((this.config.CreationEffect != null) && (this.config.CreationEffect.EffectPattern != null))
            {
                this._blackHoleEffectIx = Singleton <EffectManager> .Instance.CreateIndexedEntityEffectPattern(this.config.CreationEffect.EffectPattern, this._fieldActor.triggerField);
            }
            if (this.config.ApplyAttackerWitchTimeRatio && (evt.TriggerEvent != null))
            {
                EvtEvadeSuccess triggerEvent = evt.TriggerEvent as EvtEvadeSuccess;
                if (triggerEvent != null)
                {
                    MonsterActor actor2 = Singleton <EventManager> .Instance.GetActor <MonsterActor>(triggerEvent.attackerID);

                    if (actor2 != null)
                    {
                        ConfigMonsterAnimEvent event2 = SharedAnimEventData.ResolveAnimEvent(actor2.config, triggerEvent.skillID);
                        if (event2 != null)
                        {
                            this._blackHoleTimer.timespan *= event2.AttackProperty.WitchTimeRatio;
                        }
                    }
                }
            }
            this._blackHoleTimer.Reset(true);
        }
        private void CreateField(EvtAbilityStart evt)
        {
            Vector3 vector;

            if (this._timer.isActive)
            {
                this.StopField();
            }
            BaseMonoEntity attackTarget = null;
            float          maxDistance  = base.instancedAbility.Evaluate(this.config.CreationZOffset);
            float          num2         = base.instancedAbility.Evaluate(this.config.CreationXOffset);

            switch (this.config.TriggerPositionType)
            {
            case TriggerFieldExMixin.PositionType.Caster:
                attackTarget = base.actor.entity;
                break;

            case TriggerFieldExMixin.PositionType.AttackTarget:
                attackTarget = base.entity.GetAttackTarget();
                if (attackTarget == null)
                {
                    maxDistance += base.instancedAbility.Evaluate(this.config.NoAttackTargetZOffset);
                }
                break;

            case TriggerFieldExMixin.PositionType.Target:
                if (evt.otherID != 0)
                {
                    BaseAbilityActor actor = Singleton <EventManager> .Instance.GetActor <BaseAbilityActor>(evt.otherID);

                    if ((actor != null) && (actor.entity != null))
                    {
                        attackTarget = actor.entity;
                    }
                }
                break;
            }
            Vector3 vector2 = (Vector3)(Vector3.Cross(Vector3.up, base.entity.transform.forward).normalized *num2);

            if (attackTarget != null)
            {
                vector = (attackTarget.XZPosition + new Vector3(0f, 0.5f, 0f)) + vector2;
            }
            else
            {
                attackTarget = base.actor.entity;
                Vector3 origin = (base.entity.XZPosition + new Vector3(0f, 0.5f, 0f)) + vector2;
                vector = CollisionDetectPattern.GetRaycastPoint(origin, base.entity.transform.forward, maxDistance, 0.2f, ((int)1) << InLevelData.STAGE_COLLIDER_LAYER);
            }
            this._fieldActor = Singleton <DynamicObjectManager> .Instance.CreateAbilityTriggerField(vector, attackTarget.transform.forward, base.actor, base.instancedAbility.Evaluate(this.config.Radius), this.config.Targetting, Singleton <DynamicObjectManager> .Instance.GetNextSyncedDynamicObjectRuntimeID(), this.config.Follow);
        }
Exemple #8
0
 private void CreateExplode(Vector3 pos)
 {
     if (this.config.ExplodeAnimEventID != null)
     {
         List <CollisionResult> list = CollisionDetectPattern.CylinderCollisionDetectBySphere(pos, pos, this.config.ExplodeRadius, this.config.ExplodeRadius, Singleton <EventManager> .Instance.GetAbilityHitboxTargettingMask(base.actor.runtimeID, MixinTargetting.Enemy));
         for (int i = 0; i < list.Count; i++)
         {
             CollisionResult result = list[i];
             BaseMonoEntity  collisionResultEntity = AttackPattern.GetCollisionResultEntity(result.entity);
             if (collisionResultEntity != null)
             {
                 Singleton <EventManager> .Instance.FireEvent(new EvtHittingOther(base.actor.runtimeID, collisionResultEntity.GetRuntimeID(), this.config.ExplodeAnimEventID, result.hitPoint, result.hitForward), MPEventDispatchMode.Normal);
             }
         }
     }
 }
Exemple #9
0
        public static void CylinderCollisionDetectTargetLockedAttack(string attackName, ConfigEntityAttackPattern patternConfig, IAttacker attacker, LayerMask layerMask)
        {
            Vector3 xZPosition;
            CylinderCollisionDetectTargetLocked locked = (CylinderCollisionDetectTargetLocked)patternConfig;

            if ((attacker.AttackTarget != null) && attacker.AttackTarget.IsActive())
            {
                xZPosition = attacker.AttackTarget.XZPosition;
            }
            else
            {
                xZPosition = attacker.XZPosition;
            }
            List <CollisionResult> results = CollisionDetectPattern.CylinderCollisionDetectBySphere(attacker.XZPosition, xZPosition, locked.Radius * (1f + attacker.Evaluate(locked.RadiusRatio)), locked.Height, layerMask);

            TestAndActHit(attackName, patternConfig, attacker, results);
        }
Exemple #10
0
 private void SkillIDChangedCallback(string from, string to)
 {
     if (to == this._attackRunStopSkillID)
     {
         if (CollisionDetectPattern.CircleCollisionDetectBySphere(base.RootNodePosition, 0f, base.FaceDirection, base.config.CommonArguments.CollisionRadius * 3f, ((int)1) << InLevelData.AVATAR_LAYER).Count > 0)
         {
             this.SetTrigger(this._attackRunTriggerID);
             this._isInRun = false;
         }
         else
         {
             this._isInRun = true;
         }
     }
     else
     {
         this.ResetTrigger(this._attackRunTriggerID);
         this._isInRun = false;
     }
 }
        protected override bool ListenBulletHit(EvtBulletHit evt)
        {
            if (!base._bulletAttackDatas.ContainsKey(evt.targetID))
            {
                return(false);
            }
            BaseMPIdentity identity = Singleton <MPManager> .Instance.TryGetIdentity(evt.otherID);

            if (((identity != null) && !identity.isAuthority) && !identity.remoteMode.IsRemoteReceive())
            {
                return(false);
            }
            AttackData attackData = base._bulletAttackDatas[evt.targetID];

            attackData.isFromBullet = true;
            bool           flag   = base.baseConfig.BulletHitType == BulletHitBehavior.DestroyAndDoExplodeDamage;
            bool           flag2  = (base.baseConfig.BulletHitType == BulletHitBehavior.DestroyAndDoExplodeDamage) || (base.baseConfig.BulletHitType == BulletHitBehavior.DestroyAndDamageHitTarget);
            bool           flag3  = true;
            bool           flag4  = base.baseConfig.BulletHitType == BulletHitBehavior.NoDestroyAndRefresh;
            BaseMonoEntity entity = Singleton <EventManager> .Instance.GetEntity(evt.otherID);

            BaseAbilityActor actor = Singleton <EventManager> .Instance.GetActor(evt.otherID) as BaseAbilityActor;

            if ((entity is MonoDummyDynamicObject) || ((identity != null) && !identity.remoteMode.IsRemoteReceive()))
            {
                flag2 = false;
                flag  = false;
                flag3 = false;
                flag4 = false;
            }
            else if (evt.hitEnvironment)
            {
                flag2 = true;
                flag4 = false;
            }
            else if ((!evt.cannotBeReflected && (actor != null)) && actor.abilityState.ContainsState(AbilityState.ReflectBullet))
            {
                Singleton <EventManager> .Instance.FireEvent(new EvtAfterBulletReflected(evt.otherID, evt.targetID, base.actor.runtimeID, base._bulletAttackDatas[evt.targetID]), MPEventDispatchMode.Normal);

                return(false);
            }
            AbilityTriggerBullet bulletActor = Singleton <EventManager> .Instance.GetActor <AbilityTriggerBullet>(evt.targetID);

            if (flag2)
            {
                bulletActor.Kill();
                base._bulletAttackDatas.Remove(evt.targetID);
            }
            else
            {
                attackData = attackData.Clone();
            }
            if (flag4)
            {
                bulletActor.triggerBullet.ResetInside(base.baseConfig.ResetTime);
            }
            base._evtsLs.Clear();
            if (evt.hitEnvironment)
            {
                if (!evt.hitGround)
                {
                    return(true);
                }
                EvtHittingOther item = new EvtHittingOther(base.actor.runtimeID, evt.otherID, attackData)
                {
                    hitCollision = evt.hitCollision
                };
                base._evtsLs.Add(item);
            }
            else
            {
                attackData.hitCollision = evt.hitCollision;
                base._evtsLs.Add(new EvtHittingOther(base.actor.runtimeID, evt.otherID, base.baseConfig.HitAnimEventID, attackData));
            }
            if (flag)
            {
                List <CollisionResult> list = CollisionDetectPattern.CylinderCollisionDetectBySphere(evt.hitCollision.hitPoint, evt.hitCollision.hitPoint, base.instancedAbility.Evaluate(base.baseConfig.HitExplodeRadius), 1f, Singleton <EventManager> .Instance.GetAbilityHitboxTargettingMask(base.actor.runtimeID, base.baseConfig.Targetting));
                float y = evt.hitCollision.hitPoint.y;
                for (int j = 0; j < list.Count; j++)
                {
                    CollisionResult result = list[j];
                    BaseMonoEntity  collisionResultEntity = AttackPattern.GetCollisionResultEntity(result.entity);
                    if ((collisionResultEntity != null) && (collisionResultEntity.GetRuntimeID() != evt.otherID))
                    {
                        result.hitPoint.y = y;
                        AttackData data2 = attackData.Clone();
                        AttackResult.HitCollsion collsion = new AttackResult.HitCollsion {
                            hitDir   = result.hitForward,
                            hitPoint = result.hitPoint
                        };
                        data2.hitCollision = collsion;
                        base._evtsLs.Add(new EvtHittingOther(base.actor.runtimeID, collisionResultEntity.GetRuntimeID(), base.baseConfig.HitAnimEventID, data2));
                    }
                }
            }
            if (flag3)
            {
                Vector3 hitPoint = evt.hitCollision.hitPoint;
                if (base.baseConfig.ExplodeEffectGround)
                {
                    hitPoint.y = 0f;
                }
                Vector3 hitDir = evt.hitCollision.hitDir;
                hitDir.y = 0f;
                base.FireTriggerBulletHitExplodeEffect(bulletActor, hitPoint, hitDir, false);
            }
            if (base.baseConfig.HitExplodeActions.Length > 0)
            {
                for (int k = 0; k < base._evtsLs.Count; k++)
                {
                    base.actor.abilityPlugin.HandleActionTargetDispatch(base.baseConfig.HitExplodeActions, base.instancedAbility, base.instancedModifier, Singleton <EventManager> .Instance.GetActor <BaseAbilityActor>(base._evtsLs[k].toID), evt);
                }
            }
            for (int i = 0; i < base._evtsLs.Count; i++)
            {
                EvtHittingOther other2 = base._evtsLs[i];
                AttackPattern.SendHitEvent(base.actor.runtimeID, other2.toID, other2.animEventID, other2.hitCollision, other2.attackData, false, MPEventDispatchMode.CheckRemoteMode);
            }
            return(true);
        }
        protected virtual bool ListenBulletHit(EvtBulletHit evt)
        {
            if (!this._bulletAttackDatas.ContainsKey(evt.targetID))
            {
                return(false);
            }
            AttackData attackData = this._bulletAttackDatas[evt.targetID];

            attackData.isFromBullet = true;
            bool           flag   = this.baseConfig.BulletHitType == BulletHitBehavior.DestroyAndDoExplodeDamage;
            bool           flag2  = (this.baseConfig.BulletHitType == BulletHitBehavior.DestroyAndDoExplodeDamage) || (this.baseConfig.BulletHitType == BulletHitBehavior.DestroyAndDamageHitTarget);
            bool           flag3  = true;
            bool           flag4  = this.baseConfig.BulletHitType == BulletHitBehavior.NoDestroyAndRefresh;
            BaseMonoEntity entity = Singleton <EventManager> .Instance.GetEntity(evt.otherID);

            BaseAbilityActor actor = Singleton <EventManager> .Instance.GetActor(evt.otherID) as BaseAbilityActor;

            if (entity is MonoDummyDynamicObject)
            {
                flag2 = false;
                flag  = false;
                flag3 = false;
                flag4 = false;
            }
            else if (evt.hitEnvironment)
            {
                flag2 = true;
                flag4 = false;
            }
            else if ((!evt.cannotBeReflected && (actor != null)) && actor.abilityState.ContainsState(AbilityState.ReflectBullet))
            {
                Singleton <EventManager> .Instance.FireEvent(new EvtAfterBulletReflected(evt.otherID, evt.targetID, base.actor.runtimeID, this._bulletAttackDatas[evt.targetID]), MPEventDispatchMode.Normal);

                return(false);
            }
            AbilityTriggerBullet bulletActor = Singleton <EventManager> .Instance.GetActor <AbilityTriggerBullet>(evt.targetID);

            if (flag2)
            {
                if (bulletActor != null)
                {
                    bulletActor.Kill();
                }
                this._bulletAttackDatas.Remove(evt.targetID);
            }
            else
            {
                attackData = attackData.Clone();
            }
            if (flag4 && (bulletActor != null))
            {
                bulletActor.triggerBullet.ResetInside(this.baseConfig.ResetTime);
            }
            this._evtsLs.Clear();
            if (evt.hitEnvironment)
            {
                if (!evt.hitGround)
                {
                    return(true);
                }
                EvtHittingOther item = new EvtHittingOther(base.actor.runtimeID, evt.otherID, attackData)
                {
                    hitCollision = evt.hitCollision
                };
                this._evtsLs.Add(item);
            }
            else
            {
                attackData.hitCollision = evt.hitCollision;
                this._evtsLs.Add(new EvtHittingOther(base.actor.runtimeID, evt.otherID, this.baseConfig.HitAnimEventID, attackData));
            }
            if (flag)
            {
                List <CollisionResult> list = CollisionDetectPattern.CylinderCollisionDetectBySphere(evt.hitCollision.hitPoint, evt.hitCollision.hitPoint, base.instancedAbility.Evaluate(this.baseConfig.HitExplodeRadius), 1f, Singleton <EventManager> .Instance.GetAbilityHitboxTargettingMask(base.actor.runtimeID, this.baseConfig.Targetting));
                float y = evt.hitCollision.hitPoint.y;
                for (int j = 0; j < list.Count; j++)
                {
                    CollisionResult result = list[j];
                    BaseMonoEntity  collisionResultEntity = AttackPattern.GetCollisionResultEntity(result.entity);
                    if ((collisionResultEntity != null) && (collisionResultEntity.GetRuntimeID() != evt.otherID))
                    {
                        result.hitPoint.y = y;
                        AttackData data2 = attackData.Clone();
                        AttackResult.HitCollsion collsion = new AttackResult.HitCollsion {
                            hitDir   = result.hitForward,
                            hitPoint = result.hitPoint
                        };
                        data2.hitCollision = collsion;
                        this._evtsLs.Add(new EvtHittingOther(base.actor.runtimeID, collisionResultEntity.GetRuntimeID(), this.baseConfig.HitAnimEventID, data2));
                    }
                }
            }
            if (flag3)
            {
                Vector3 hitPoint = evt.hitCollision.hitPoint;
                if (this.baseConfig.ExplodeEffectGround)
                {
                    hitPoint.y = 0f;
                }
                Vector3 hitDir = evt.hitCollision.hitDir;
                hitDir.y = 0f;
                bool selfExplode = evt.selfExplode;
                if (bulletActor != null)
                {
                    this.FireTriggerBulletHitExplodeEffect(bulletActor, hitPoint, hitDir, selfExplode);
                }
            }
            if ((this.baseConfig.HitExplodeActions.Length > 0) && (!evt.selfExplode || !this.baseConfig.MuteSelfHitExplodeActions))
            {
                for (int k = 0; k < this._evtsLs.Count; k++)
                {
                    if (base.actor.abilityPlugin != null)
                    {
                        base.actor.abilityPlugin.HandleActionTargetDispatch(this.baseConfig.HitExplodeActions, base.instancedAbility, base.instancedModifier, Singleton <EventManager> .Instance.GetActor <BaseAbilityActor>(this._evtsLs[k].toID), evt);
                    }
                }
            }
            for (int i = 0; i < this._evtsLs.Count; i++)
            {
                EvtHittingOther other2 = this._evtsLs[i];
                if (this.baseConfig.IsHitChangeTargetDirection && (other2.attackData.hitEffect >= AttackResult.AnimatorHitEffect.ThrowUp))
                {
                    BaseAbilityActor actor2 = Singleton <EventManager> .Instance.GetActor <BaseAbilityActor>(other2.toID);

                    if (actor2 != null)
                    {
                        actor2.entity.transform.forward = -other2.attackData.hitCollision.hitDir;
                    }
                }
                Singleton <EventManager> .Instance.FireEvent(other2, MPEventDispatchMode.Normal);
            }
            return(true);
        }