Exemple #1
0
 public void CacheBulletDataUseResource(BulletData bulletData, Player player = null)
 {
     if (!(bulletData == null))
     {
         BulletData.BulletBase data = bulletData.data;
         string effectName          = data.GetEffectName(player);
         if (!effectName.IsNullOrWhiteSpace())
         {
             CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, effectName);
         }
         CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, data.landHiteffectName);
         if (data.endBullet != null)
         {
             CacheBulletDataUseResource(data.endBullet, null);
         }
         BulletData.BulletFunnel dataFunnel = bulletData.dataFunnel;
         if (dataFunnel != null && dataFunnel.bitBullet != null)
         {
             CacheBulletDataUseResource(dataFunnel.bitBullet, null);
         }
         BulletData.BulletMine dataMine = bulletData.dataMine;
         if (dataMine != null && dataMine.explodeBullet != null)
         {
             CacheBulletDataUseResource(dataMine.explodeBullet, null);
         }
         BulletData.BulletTracking dataTracking = bulletData.dataTracking;
         if (dataTracking != null && dataTracking.emissionBullet != null)
         {
             CacheBulletDataUseResource(dataTracking.emissionBullet, null);
         }
         BulletData.BulletUndead dataUndead = bulletData.dataUndead;
         if (dataUndead != null && dataUndead.closeBullet != null)
         {
             CacheBulletDataUseResource(dataUndead.closeBullet, null);
         }
         BulletData.BulletDig dataDig = bulletData.dataDig;
         if (dataDig != null && dataDig.flyOutBullet != null)
         {
             CacheBulletDataUseResource(dataDig.flyOutBullet, null);
         }
         BulletData.BulletActionMine dataActionMine = bulletData.dataActionMine;
         if (dataActionMine != null && dataActionMine.explodeBullet != null && dataActionMine.actionBullet != null)
         {
             CacheBulletDataUseResource(dataActionMine.explodeBullet, null);
             CacheBulletDataUseResource(dataActionMine.actionBullet, null);
             CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, dataActionMine.appearEffectName);
             CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, dataActionMine.actionEffectName1);
             CacheEffect(RESOURCE_CATEGORY.EFFECT_ACTION, dataActionMine.actionEffectName2);
         }
     }
 }
    private AnimEventShot CreateExplosion()
    {
        //IL_0055: Unknown result type (might be due to invalid IL or missing references)
        //IL_005a: 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)
        //IL_0066: Unknown result type (might be due to invalid IL or missing references)
        //IL_0079: Unknown result type (might be due to invalid IL or missing references)
        //IL_007a: Unknown result type (might be due to invalid IL or missing references)
        BulletData bulletData = m_atkInfo.bulletData;

        if (bulletData == null)
        {
            return(null);
        }
        BulletData.BulletActionMine dataActionMine = bulletData.dataActionMine;
        if (dataActionMine == null)
        {
            return(null);
        }
        if (m_attacker == null)
        {
            return(null);
        }
        if (dataActionMine.explodeBullet == null)
        {
            return(null);
        }
        Quaternion    rotation      = m_cachedTransform.get_rotation();
        Vector3       position      = m_cachedTransform.get_position();
        AnimEventShot animEventShot = AnimEventShot.CreateByExternalBulletData(dataActionMine.explodeBullet, m_attacker, m_atkInfo, position, rotation, null, Player.ATTACK_MODE.NONE, null);

        if (animEventShot == null)
        {
            return(null);
        }
        return(animEventShot);
    }
    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();
                }
            }
        }
    }