private AnimEventShot CreateBullet()
    {
        //IL_0042: Unknown result type (might be due to invalid IL or missing references)
        //IL_0047: Unknown result type (might be due to invalid IL or missing references)
        //IL_004e: Unknown result type (might be due to invalid IL or missing references)
        //IL_0053: 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_0067: Unknown result type (might be due to invalid IL or missing references)
        BulletData bulletData = m_atkInfo.bulletData;

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

        if (animEventShot == null)
        {
            Log.Error("Failed to create AnimEventShot for Undead!!");
            return(null);
        }
        return(animEventShot);
    }
    public void Initialize(StageObject attacker, AttackInfo atkInfo, StageObject targetObj, Transform launchTrans, Vector3 offsetPos, Quaternion offsetRot)
    {
        //IL_0085: Unknown result type (might be due to invalid IL or missing references)
        //IL_008a: Expected O, but got Unknown
        //IL_00c5: Unknown result type (might be due to invalid IL or missing references)
        //IL_00cc: 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)
        //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
        //IL_00d8: Unknown result type (might be due to invalid IL or missing references)
        //IL_00ea: Unknown result type (might be due to invalid IL or missing references)
        //IL_00ef: 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_0107: Unknown result type (might be due to invalid IL or missing references)
        //IL_011d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0122: Expected O, but got Unknown
        //IL_012f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0140: Unknown result type (might be due to invalid IL or missing references)
        //IL_0145: Unknown result type (might be due to invalid IL or missing references)
        //IL_0150: Unknown result type (might be due to invalid IL or missing references)
        //IL_015c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0161: Expected O, but got Unknown
        m_attacker = attacker;
        m_atkInfo  = atkInfo;
        AttackHitInfo attackHitInfo = atkInfo as AttackHitInfo;

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

        m_landHitEffectName = bulletData.data.landHiteffectName;
        m_aliveTimer        = bulletData.data.appearTime;
        m_moveSpeed         = bulletData.data.speed;
        BulletData.BulletUndead dataUndead = bulletData.dataUndead;
        m_aimAngleSpeed   = dataUndead.lookAtAngle * 0.0174532924f;
        m_undeadData      = dataUndead;
        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(launchTrans.get_position() + launchTrans.get_rotation() * offsetPos);
        m_cachedTransform.set_rotation(launchTrans.get_rotation() * offsetRot);
        m_cachedTransform.set_localScale(bulletData.data.timeStartScale);
        Transform effect = EffectManager.GetEffect(bulletData.data.effectName, this.get_transform());

        effect.set_localPosition(bulletData.data.dispOffset);
        effect.set_localRotation(Quaternion.Euler(bulletData.data.dispRotation));
        effect.set_localScale(Vector3.get_one());
        m_effectObj      = effect.get_gameObject();
        m_effectAnimator = m_effectObj.GetComponent <Animator>();
        m_targetObject   = targetObj;
        RequestMain();
    }
Exemple #3
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);
         }
     }
 }