public void AddProcessor(AttackColliderProcessor processor)
 {
     if (processorList.IndexOf(processor) < 0)
     {
         processorList.Add(processor);
     }
 }
 private void FixedUpdate()
 {
     //IL_0018: Unknown result type (might be due to invalid IL or missing references)
     //IL_001e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0029: Unknown result type (might be due to invalid IL or missing references)
     //IL_002f: Unknown result type (might be due to invalid IL or missing references)
     if (!isReleased)
     {
         if (isUpdateFixTrans)
         {
             this.get_transform().set_position(fixPos);
             this.get_transform().set_rotation(fixRot);
         }
         if ((colliderInfo & COLLIDER_INFO.RESERVE_RELEASE) != 0 && (colliderInfo & COLLIDER_INFO.FIXED_UPDATE) != 0)
         {
             enabledCollider = false;
         }
         if (!enabledCollider)
         {
             if (colliderProcessor != null && !colliderProcessor.IsBusy())
             {
                 colliderProcessor.OnDestroy();
                 colliderProcessor = null;
             }
             if (colliderProcessor == null)
             {
                 colliderInfo |= COLLIDER_INFO.RELEASED;
             }
         }
         if (checkFixedUpdate)
         {
             colliderInfo |= COLLIDER_INFO.FIXED_UPDATE;
         }
     }
 }
示例#3
0
    public void InitializeForExAtkCollider(StageObject attacker, Transform parent, AttackInfo atkInfo, Vector3 pos, Vector3 rot, float radius, float height, int attackLayer)
    {
        //IL_0001: Unknown result type (might be due to invalid IL or missing references)
        //IL_001c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0021: Expected O, but got Unknown
        //IL_002a: Unknown result type (might be due to invalid IL or missing references)
        //IL_0032: Unknown result type (might be due to invalid IL or missing references)
        //IL_003a: Unknown result type (might be due to invalid IL or missing references)
        //IL_008e: Unknown result type (might be due to invalid IL or missing references)
        this.get_gameObject().set_layer(attackLayer);
        m_attacker   = attacker;
        m_attackInfo = atkInfo;
        Transform val = this.get_transform();

        val.set_parent(parent);
        val.set_localEulerAngles(rot);
        val.set_localPosition(pos);
        val.set_localScale(Vector3.get_one());
        m_capsule.set_direction(2);
        m_capsule.set_radius(radius);
        m_capsule.set_height(height);
        m_capsule.set_enabled(true);
        m_capsule.set_center(new Vector3(0f, 0f, height * 0.5f));
        m_capsule.set_isTrigger(true);
        m_timeCount = 0f;
        if (MonoBehaviourSingleton <AttackColliderManager> .IsValid())
        {
            m_colliderProcessor = MonoBehaviourSingleton <AttackColliderManager> .I.CreateProcessor(m_attackInfo, attacker, m_capsule, this, Player.ATTACK_MODE.NONE, null);

            m_attackHitChecker = attacker.ReferenceAttackHitChecker();
        }
    }
示例#4
0
 public virtual void OnDestroy()
 {
     //IL_00e5: Unknown result type (might be due to invalid IL or missing references)
     //IL_00f1: Unknown result type (might be due to invalid IL or missing references)
     //IL_0142: Unknown result type (might be due to invalid IL or missing references)
     //IL_0151: Expected O, but got Unknown
     //IL_0172: Unknown result type (might be due to invalid IL or missing references)
     if (!AppMain.isApplicationQuit && !isDestroyed)
     {
         isDestroyed = true;
         if (_rigidbody != null)
         {
             _rigidbody.Sleep();
         }
         if (_collider != null)
         {
             _collider.set_enabled(false);
         }
         capsuleCollider = null;
         if (controller != null)
         {
             controller.set_enabled(false);
         }
         if (colliderProcessor != null)
         {
             if (endBullet != null)
             {
                 CreateEndBullet();
             }
             colliderProcessor.OnDestroy();
             colliderProcessor = null;
         }
         if (isLandHitDelete && !string.IsNullOrEmpty(landHitEfect))
         {
             Transform effect = EffectManager.GetEffect(landHitEfect, null);
             if (effect != null)
             {
                 effect.set_localPosition(landHitPosition);
                 effect.set_localRotation(landHitRotation);
             }
         }
         Transform val = (!MonoBehaviourSingleton <StageObjectManager> .IsValid()) ? MonoBehaviourSingleton <EffectManager> .I._transform : MonoBehaviourSingleton <StageObjectManager> .I._transform;
         if (bulletEffect != null)
         {
             bulletEffect.set_parent(val);
             EffectManager.ReleaseEffect(bulletEffect.get_gameObject(), !m_isDisablePlayEndAnim, false);
         }
         if (MonoBehaviourSingleton <StageObjectManager> .IsValid())
         {
             MonoBehaviourSingleton <StageObjectManager> .I.RemoveNotifyInterface(this);
         }
         NotifyDestroy();
         Object.Destroy(this.get_gameObject());
     }
 }
    public AttackColliderProcessor CreateProcessor(AttackInfo _attack_info, StageObject _object, Collider _collider, IAttackCollider _collider_interface, Player.ATTACK_MODE attackMode = Player.ATTACK_MODE.NONE, DamageDistanceTable.DamageDistanceData damageDistanceData = null)
    {
        AttackColliderProcessor attackColliderProcessor = null;

        if (_attack_info is AttackHitInfo)
        {
            attackColliderProcessor = new AttackHitColliderProcessor();
        }
        else if (_attack_info is AttackContinuationInfo)
        {
            attackColliderProcessor = new AttackContinuationColliderProcessor();
        }
        attackColliderProcessor.SetFromInfo(_attack_info, _object, _collider, _collider_interface);
        attackColliderProcessor.SetAttackMode(attackMode);
        attackColliderProcessor.SetDamageDistanceData(damageDistanceData);
        AddProcessor(attackColliderProcessor);
        return(attackColliderProcessor);
    }
示例#6
0
    private void _Initialize(StageObject attacker, Transform parent, Vector3 pos, Vector3 rot, float height, int attackLayer, float healAtk, float radius)
    {
        //IL_000d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0055: Unknown result type (might be due to invalid IL or missing references)
        //IL_005a: Expected O, but got Unknown
        //IL_0063: Unknown result type (might be due to invalid IL or missing references)
        //IL_006c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0071: Unknown result type (might be due to invalid IL or missing references)
        //IL_0072: Unknown result type (might be due to invalid IL or missing references)
        //IL_007d: Unknown result type (might be due to invalid IL or missing references)
        //IL_00d1: Unknown result type (might be due to invalid IL or missing references)
        m_player = (attacker as Player);
        this.get_gameObject().set_layer(attackLayer);
        AttackHitInfo attackHitInfo = m_player.FindAttackInfo(isDuplicate: this.isDuplicateAttackInfo, name: GetAttackInfoName(), fix_rate: true) as AttackHitInfo;

        attackHitInfo.atk.normal = healAtk;
        m_attacker   = attacker;
        m_attackInfo = attackHitInfo;
        Transform val = this.get_transform();

        val.set_parent(parent);
        val.set_localEulerAngles(rot);
        val.set_localPosition(val.get_localRotation() * pos);
        val.set_localScale(Vector3.get_one());
        m_capsule.set_direction(2);
        m_capsule.set_radius(radius);
        m_capsule.set_height(height);
        m_capsule.set_enabled(true);
        m_capsule.set_center(new Vector3(0f, 0f, height * 0.5f));
        m_capsule.set_isTrigger(true);
        m_timeCount = 0f;
        if (MonoBehaviourSingleton <AttackColliderManager> .IsValid())
        {
            m_colliderProcessor = MonoBehaviourSingleton <AttackColliderManager> .I.CreateProcessor(m_attackInfo, attacker, m_capsule, this, Player.ATTACK_MODE.NONE, null);

            m_attackHitChecker = attacker.ReferenceAttackHitChecker();
        }
    }
        public void SetColliderInfo(StageObject _stageObject, Transform parent, AttackInfo info, Vector3 pos, Vector3 rot, float radius, float height)
        {
            //IL_000f: Unknown result type (might be due to invalid IL or missing references)
            //IL_001b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0020: Unknown result type (might be due to invalid IL or missing references)
            //IL_0028: Unknown result type (might be due to invalid IL or missing references)
            //IL_002d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0035: Unknown result type (might be due to invalid IL or missing references)
            //IL_003a: Unknown result type (might be due to invalid IL or missing references)
            //IL_0046: Unknown result type (might be due to invalid IL or missing references)
            //IL_004b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0050: Unknown result type (might be due to invalid IL or missing references)
            //IL_0057: Unknown result type (might be due to invalid IL or missing references)
            //IL_005c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0061: Unknown result type (might be due to invalid IL or missing references)
            stageObject = _stageObject;
            attackInfo  = info;
            this.get_transform().set_parent(parent);
            this.get_transform().set_localPosition(pos);
            this.get_transform().set_localEulerAngles(rot);
            this.get_transform().set_localScale(Vector3.get_one());
            fixPos = this.get_transform().get_position();
            fixRot = this.get_transform().get_rotation();
            capsule.set_direction(2);
            capsule.set_radius(radius);
            capsule.set_height(height);
            capsule.set_enabled(true);
            capsule.set_isTrigger(true);
            stageObject._rigidbody.WakeUp();
            timeCount    = 0f;
            colliderInfo = COLLIDER_INFO.NONE;
            if (MonoBehaviourSingleton <AttackColliderManager> .IsValid())
            {
                colliderProcessor = MonoBehaviourSingleton <AttackColliderManager> .I.CreateProcessor(attackInfo, stageObject, capsule, this, Player.ATTACK_MODE.NONE, null);

                attackHitChecker = stageObject.ReferenceAttackHitChecker();
            }
        }
 public void RemoveProcessor(AttackColliderProcessor processor)
 {
     processorList.Remove(processor);
 }
示例#9
0
    public virtual void Shot(StageObject master, AttackInfo atkInfo, BulletData bulletData, Vector3 pos, Quaternion rot, string exEffectName = null, bool reference_attack = true, AtkAttribute exAtk = null, Player.ATTACK_MODE attackMode = Player.ATTACK_MODE.NONE, DamageDistanceTable.DamageDistanceData damageDistanceData = null, SkillInfo.SkillParam exSkillParam = null)
    {
        //IL_0008: Unknown result type (might be due to invalid IL or missing references)
        //IL_0080: Unknown result type (might be due to invalid IL or missing references)
        //IL_0096: Unknown result type (might be due to invalid IL or missing references)
        //IL_009b: Unknown result type (might be due to invalid IL or missing references)
        //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
        //IL_01eb: Unknown result type (might be due to invalid IL or missing references)
        //IL_01ed: Unknown result type (might be due to invalid IL or missing references)
        //IL_0202: Unknown result type (might be due to invalid IL or missing references)
        //IL_02d4: Unknown result type (might be due to invalid IL or missing references)
        //IL_02d9: Unknown result type (might be due to invalid IL or missing references)
        //IL_02f6: Unknown result type (might be due to invalid IL or missing references)
        //IL_02fb: Unknown result type (might be due to invalid IL or missing references)
        //IL_031d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0322: Unknown result type (might be due to invalid IL or missing references)
        //IL_0344: Unknown result type (might be due to invalid IL or missing references)
        //IL_0349: Unknown result type (might be due to invalid IL or missing references)
        //IL_0352: Unknown result type (might be due to invalid IL or missing references)
        //IL_0357: Unknown result type (might be due to invalid IL or missing references)
        //IL_0359: Unknown result type (might be due to invalid IL or missing references)
        //IL_036b: Unknown result type (might be due to invalid IL or missing references)
        Player player = master as Player;

        this.get_gameObject().SetActive(true);
        stageObject  = master;
        m_exAtk      = exAtk;
        m_attackMode = attackMode;
        string text = bulletData.data.GetEffectName(player);

        if (!string.IsNullOrEmpty(exEffectName))
        {
            text = exEffectName;
        }
        if (!string.IsNullOrEmpty(text))
        {
            bulletEffect = EffectManager.GetEffect(text, _transform);
            if (bulletEffect != null)
            {
                bulletEffect.set_localPosition(bulletData.data.dispOffset);
                bulletEffect.set_localRotation(Quaternion.Euler(bulletData.data.dispRotation));
                bulletEffect.set_localScale(Vector3.get_one());
            }
        }
        AttackHitInfo attackHitInfo = atkInfo as AttackHitInfo;

        if (exAtk != null)
        {
            masterAtk = exAtk;
        }
        else if (attackHitInfo != null)
        {
            if (player != null && HasEndBulletSkillIndex)
            {
                int skillIndex = player.skillInfo.skillIndex;
                player.skillInfo.skillIndex = m_endBulletSkillIndex;
                master.GetAtk(attackHitInfo, ref masterAtk);
                player.skillInfo.skillIndex = skillIndex;
            }
            else
            {
                master.GetAtk(attackHitInfo, ref masterAtk);
            }
        }
        masterSkill = null;
        if (player != null)
        {
            if (exSkillParam != null)
            {
                masterSkill = exSkillParam;
            }
            else
            {
                masterSkill = player.skillInfo.actSkillParam;
                if (player.TrackingTargetBullet != null && player.TrackingTargetBullet.IsReplaceSkill && atkInfo.isSkillReference)
                {
                    masterSkill = player.TrackingTargetBullet.SkillParamForBullet;
                }
                if (HasEndBulletSkillIndex)
                {
                    masterSkill = player.GetSkillParam(m_endBulletSkillIndex);
                }
            }
        }
        if (bulletData.data.isEmitGround)
        {
            pos.y = 0f;
        }
        SetBulletData(bulletData, masterSkill, pos, rot);
        if (bulletData.type == BulletData.BULLET_TYPE.OBSTACLE)
        {
            AttackObstacle attackObstacle = this.get_gameObject().AddComponent <AttackObstacle>();
            attackObstacle.Initialize(this as AnimEventShot, bulletData.dataObstacle.colliderStartTime);
        }
        else if (bulletData.type != BulletData.BULLET_TYPE.HEALING_HOMING)
        {
            int layer = (!(master is Player)) ? 15 : 14;
            Utility.SetLayerWithChildren(_transform, layer);
        }
        timeCount = 0f;
        if (MonoBehaviourSingleton <AttackColliderManager> .IsValid())
        {
            colliderProcessor = MonoBehaviourSingleton <AttackColliderManager> .I.CreateProcessor(atkInfo, stageObject, _collider, this, attackMode, damageDistanceData);

            if (reference_attack)
            {
                attackHitChecker = stageObject.ReferenceAttackHitChecker();
            }
            if (bulletData.type == BulletData.BULLET_TYPE.SNATCH || bulletData.type == BulletData.BULLET_TYPE.PAIR_SWORDS_LASER)
            {
                colliderProcessor.ValidTriggerStay();
            }
        }
        Vector3 val = Vector3.get_zero();

        if (_collider is BoxCollider)
        {
            val = (_collider as BoxCollider).get_center();
        }
        else if (_collider is SphereCollider)
        {
            val = (_collider as SphereCollider).get_center();
        }
        else if (_collider is CapsuleCollider)
        {
            val = (_collider as CapsuleCollider).get_center();
        }
        startColliderPos = _transform.get_position() + val;
        isDestroyed      = false;
        prevPosition     = pos;
        if (controller != null)
        {
            controller.OnShot();
        }
    }
    public void Initialize(InitParamActionMine initParam)
    {
        //IL_000c: Unknown result type (might be due to invalid IL or missing references)
        //IL_00be: Unknown result type (might be due to invalid IL or missing references)
        //IL_00c3: Expected O, but got Unknown
        //IL_00fd: Unknown result type (might be due to invalid IL or missing references)
        //IL_010e: Unknown result type (might be due to invalid IL or missing references)
        //IL_011f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0130: Unknown result type (might be due to invalid IL or missing references)
        //IL_0135: Expected O, but got Unknown
        //IL_013f: Unknown result type (might be due to invalid IL or missing references)
        //IL_014c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0151: Unknown result type (might be due to invalid IL or missing references)
        //IL_015d: Unknown result type (might be due to invalid IL or missing references)
        //IL_016a: Unknown result type (might be due to invalid IL or missing references)
        //IL_016f: Expected O, but got Unknown
        //IL_0187: Unknown result type (might be due to invalid IL or missing references)
        //IL_01d5: Unknown result type (might be due to invalid IL or missing references)
        //IL_01ec: Unknown result type (might be due to invalid IL or missing references)
        //IL_02a7: Unknown result type (might be due to invalid IL or missing references)
        //IL_02ac: Unknown result type (might be due to invalid IL or missing references)
        //IL_02c0: Unknown result type (might be due to invalid IL or missing references)
        //IL_02c5: Unknown result type (might be due to invalid IL or missing references)
        //IL_02de: Unknown result type (might be due to invalid IL or missing references)
        //IL_02e6: Unknown result type (might be due to invalid IL or missing references)
        m_timeCount = 0f;
        this.get_gameObject().set_layer(31);
        m_atkInfo = initParam.atkInfo;
        AttackHitInfo attackHitInfo = m_atkInfo as AttackHitInfo;

        if (attackHitInfo != null)
        {
            attackHitInfo.enableIdentityCheck = false;
        }
        BulletData bulletData = m_atkInfo.bulletData;

        if (!(bulletData == null))
        {
            BulletData.BulletBase data = bulletData.data;
            if (data != null)
            {
                BulletData.BulletActionMine dataActionMine = bulletData.dataActionMine;
                if (dataActionMine != null)
                {
                    m_actionCoolTime    = dataActionMine.actionCoolTime;
                    m_attacker          = initParam.attacker;
                    m_landHitEffectName = data.landHiteffectName;
                    m_aliveTime         = data.appearTime;
                    m_unbreakableTimer  = dataActionMine.unbrakableTime;
                    m_mineData          = dataActionMine;
                    m_isDeleted         = false;
                    m_cachedTransform   = this.get_transform();
                    m_cachedTransform.set_parent((!MonoBehaviourSingleton <StageObjectManager> .IsValid()) ? MonoBehaviourSingleton <EffectManager> .I._transform : MonoBehaviourSingleton <StageObjectManager> .I._transform);
                    m_cachedTransform.set_position(initParam.position);
                    m_cachedTransform.set_rotation(initParam.rotation);
                    m_cachedTransform.set_localScale(data.timeStartScale);
                    Transform effect = EffectManager.GetEffect(data.effectName, this.get_transform());
                    effect.set_localPosition(data.dispOffset);
                    effect.set_localRotation(Quaternion.Euler(data.dispRotation));
                    effect.set_localScale(Vector3.get_one());
                    m_effectObj            = effect.get_gameObject();
                    m_effectDeleteAnimator = m_effectObj.GetComponent <Animator>();
                    m_capsule = this.get_gameObject().AddComponent <CapsuleCollider>();
                    m_capsule.set_direction(2);
                    m_capsule.set_radius(data.radius);
                    m_capsule.set_height(0f);
                    m_capsule.set_enabled(true);
                    m_capsule.set_center(Vector3.get_zero());
                    m_capsule.set_isTrigger(true);
                    Rigidbody val = this.get_gameObject().AddComponent <Rigidbody>();
                    val.set_useGravity(false);
                    int num = 0;
                    if (dataActionMine.isIgnoreHitEnemyAttack)
                    {
                        num |= 0x2000;
                    }
                    if (dataActionMine.isIgnoreHitEnemyMove)
                    {
                        num |= 0x400;
                    }
                    if (MonoBehaviourSingleton <AttackColliderManager> .IsValid())
                    {
                        m_colliderProcessor = MonoBehaviourSingleton <AttackColliderManager> .I.CreateProcessor(m_atkInfo, m_attacker, m_capsule, this, Player.ATTACK_MODE.NONE, null);

                        m_attackHitChecker = m_attacker.ReferenceAttackHitChecker();
                    }
                    rand  = new Random(initParam.randomSeed);
                    objId = initParam.id;
                    if (!string.IsNullOrEmpty(m_mineData.appearEffectName))
                    {
                        Vector3 position  = m_cachedTransform.get_position();
                        float   x         = position.x;
                        Vector3 position2 = m_cachedTransform.get_position();
                        Vector3 pos       = default(Vector3);
                        pos._002Ector(x, 0.1f, position2.z);
                        EffectManager.OneShot(m_mineData.appearEffectName, pos, m_cachedTransform.get_rotation(), true);
                    }
                    RequestMain();
                }
            }
        }
    }