public static AtkAttribute CalcEnemyATK(EnemyAtkCalcData calcData)
    {
        AtkAttribute  atkAttribute = new AtkAttribute();
        AttackHitInfo atkInfo      = calcData.atkInfo;

        if (atkInfo != null)
        {
            atkAttribute.Add(atkInfo.atk);
        }
        AtkAttribute atkAttribute2 = new AtkAttribute();

        atkAttribute2.Set(0f);
        atkAttribute2.Add(calcData.buffAtkRate);
        AtkAttribute atkAttribute3 = new AtkAttribute();

        atkAttribute3.Copy(atkAttribute);
        atkAttribute3.Mul(atkAttribute2);
        atkAttribute.Add(atkAttribute3);
        atkAttribute.Add(calcData.buffAtkConstant);
        if (calcData.buffAtkAllElementConstant > 0f)
        {
            atkAttribute.AddElementValueWithCheck(calcData.buffAtkAllElementConstant);
        }
        return(atkAttribute);
    }
 public void SetAttackedHitStatus(AttackedHitStatusOwner status)
 {
     //IL_003c: Unknown result type (might be due to invalid IL or missing references)
     //IL_0041: Unknown result type (might be due to invalid IL or missing references)
     //IL_0048: Unknown result type (might be due to invalid IL or missing references)
     //IL_004d: Unknown result type (might be due to invalid IL or missing references)
     attackInfoName = status.attackInfo.name;
     attackInfoRate = status.attackInfo.rateInfoRate;
     fromObjectID   = status.fromObjectID;
     fromType       = (int)status.fromType;
     fromPos        = status.fromPos;
     hitPos         = status.hitPos;
     fromClientID   = status.fromClientID;
     if (status.skillParam != null)
     {
         skillIndex = status.skillParam.skillIndex;
     }
     regionID         = status.regionID;
     weakState        = (int)status.weakState;
     damage           = status.damage;
     validDamage      = status.validDamage;
     downAddBase      = status.downAddBase;
     downAddWeak      = status.downAddWeak;
     isArrowBleed     = status.isArrowBleed;
     arrowBleedDamage = status.arrowBleedDamage;
     arrowBurstDamage = status.arrowBurstDamage;
     badStatusAdd.Copy(status.badStatusAdd);
     isSpAttackHit   = status.IsSpAttackHit;
     damageDetails   = status.damageDetails;
     isShadowSealing = status.isShadowSealing;
 }
Exemplo n.º 3
0
 public void OnDisappear(bool isExplode)
 {
     //IL_0017: Unknown result type (might be due to invalid IL or missing references)
     //IL_001d: Expected O, but got Unknown
     //IL_002d: Unknown result type (might be due to invalid IL or missing references)
     //IL_0034: Expected O, but got Unknown
     //IL_0077: Unknown result type (might be due to invalid IL or missing references)
     //IL_007c: Unknown result type (might be due to invalid IL or missing references)
     //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
     //IL_00ab: Expected O, but got Unknown
     //IL_00b6: Unknown result type (might be due to invalid IL or missing references)
     if (!object.ReferenceEquals(cachedEffectTransform, null) && !object.ReferenceEquals((object)cachedEffectTransform.get_gameObject(), null))
     {
         EffectManager.ReleaseEffect(cachedEffectTransform.get_gameObject(), true, false);
     }
     cachedEffectTransform = null;
     if (isExplode && !object.ReferenceEquals(atkInfo, null))
     {
         AtkAttribute         atkAttribute = exAtk;
         SkillInfo.SkillParam exSkillParam = skillParam;
         AnimEventShot.Create(ownerPlayer, atkInfo, cachedTransform.get_position(), Quaternion.get_identity(), null, true, null, null, atkAttribute, Player.ATTACK_MODE.NONE, null, exSkillParam);
     }
     ownerPlayer = null;
     atkInfo     = null;
     bulletData  = null;
     if (!object.ReferenceEquals((object)this.get_gameObject(), null))
     {
         Object.Destroy(this.get_gameObject());
     }
 }
Exemplo n.º 4
0
 public virtual void GetAtk(AttackHitInfo info, ref AtkAttribute atk)
 {
     if (info != null)
     {
         atk.Add(info.atk);
     }
 }
    private AnimEventShot CreateBullet(int index)
    {
        //IL_006f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0074: Unknown result type (might be due to invalid IL or missing references)
        //IL_007b: 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_00dc: Unknown result type (might be due to invalid IL or missing references)
        //IL_00dd: Unknown result type (might be due to invalid IL or missing references)
        if (m_trackingData == null)
        {
            return(null);
        }
        if (m_attacker == null)
        {
            return(null);
        }
        if (m_atkInfoNames == null || m_atkInfoNames.Length <= 0)
        {
            return(null);
        }
        if (m_atkInfoNames.Length < index)
        {
            return(null);
        }
        AttackInfo attackInfo = m_attacker.FindAttackInfo(m_atkInfoNames[index], true, false);

        if (attackInfo == null)
        {
            return(null);
        }
        Quaternion rotation = m_cachedTransform.get_rotation();
        Vector3    position = m_cachedTransform.get_position();

        if (m_attackerPlayer != null)
        {
            IsReplaceSkill = true;
        }
        AtkAttribute atk = m_exAtkList[index];

        if (atk == null)
        {
            atk = new AtkAttribute();
            m_attacker.GetAtk(attackInfo as AttackHitInfo, ref atk);
            m_exAtkList[index] = atk;
        }
        AnimEventShot animEventShot = AnimEventShot.CreateByExternalBulletData(m_trackingData.emissionBullet, m_attacker, attackInfo, position, rotation, atk, m_attackMode, null);

        if (animEventShot == null)
        {
            Log.Error("Failed to create AnimEventShot for tracking bullet!");
            return(null);
        }
        if (m_attackerPlayer != null)
        {
            IsReplaceSkill = false;
        }
        return(animEventShot);
    }
Exemplo n.º 6
0
 public void Sub(AtkAttribute val)
 {
     normal  -= val.normal;
     fire    -= val.fire;
     water   -= val.water;
     thunder -= val.thunder;
     soil    -= val.soil;
     light   -= val.light;
     dark    -= val.dark;
 }
Exemplo n.º 7
0
 public void Mul(AtkAttribute val)
 {
     normal  *= val.normal;
     fire    *= val.fire;
     water   *= val.water;
     thunder *= val.thunder;
     soil    *= val.soil;
     light   *= val.light;
     dark    *= val.dark;
 }
Exemplo n.º 8
0
 public void Copy(AtkAttribute srcAtk)
 {
     normal  = srcAtk.normal;
     fire    = srcAtk.fire;
     water   = srcAtk.water;
     thunder = srcAtk.thunder;
     soil    = srcAtk.soil;
     light   = srcAtk.light;
     dark    = srcAtk.dark;
 }
Exemplo n.º 9
0
 public void Add(AtkAttribute val)
 {
     if (val != null)
     {
         normal  += val.normal;
         fire    += val.fire;
         water   += val.water;
         thunder += val.thunder;
         soil    += val.soil;
         light   += val.light;
         dark    += val.dark;
     }
 }
    public override void Initialize(StageObject attacker, AttackInfo atkInfo, StageObject targetObj, Transform launchTrans, Vector3 offsetPos, Quaternion offsetRot)
    {
        //IL_0006: Unknown result type (might be due to invalid IL or missing references)
        //IL_0008: Unknown result type (might be due to invalid IL or missing references)
        base.Initialize(attacker, atkInfo, targetObj, launchTrans, offsetPos, offsetRot);
        Player player = attacker as Player;

        if (player != null)
        {
            AtkAttribute atk = new AtkAttribute();
            attacker.GetAtk(atkInfo as AttackHitInfo, ref atk);
            SetAttackMode(player.attackMode);
            SetExAtk(atk);
            SetSkillParam(player.skillInfo.actSkillParam);
        }
    }
 public void SetAttackedHitStatus(AttackedHitStatusFix status)
 {
     //IL_003c: Unknown result type (might be due to invalid IL or missing references)
     //IL_0041: Unknown result type (might be due to invalid IL or missing references)
     //IL_00d0: Unknown result type (might be due to invalid IL or missing references)
     //IL_00d5: Unknown result type (might be due to invalid IL or missing references)
     //IL_0124: Unknown result type (might be due to invalid IL or missing references)
     //IL_0129: Unknown result type (might be due to invalid IL or missing references)
     attackInfoName = status.attackInfo.name;
     attackInfoRate = status.attackInfo.rateInfoRate;
     fromObjectID   = status.fromObjectID;
     fromType       = (int)status.fromType;
     hitPos         = status.hitPos;
     fromClientID   = status.fromClientID;
     if (status.skillParam != null)
     {
         skillIndex = status.skillParam.skillIndex;
     }
     regionID         = status.regionID;
     weakState        = (int)status.weakState;
     damage           = status.damage;
     downAddBase      = status.downAddBase;
     downAddWeak      = status.downAddWeak;
     isArrowBleed     = status.isArrowBleed;
     arrowBleedDamage = status.arrowBleedDamage;
     arrowBurstDamage = status.arrowBurstDamage;
     hostPos          = status.hostPos;
     hostDir          = status.hostDir;
     afterHP          = status.afterHP;
     afterRegionHP    = status.afterRegionHP;
     afterHealHp      = status.afterHealHp;
     breakRegion      = status.breakRegion;
     reactionType     = status.reactionType;
     blowForce        = status.blowForce;
     downTotal        = status.downTotal;
     badStatusTotal.Copy(status.badStatusTotal);
     damageHpRate         = status.damageHpRate;
     arrowBleedSkipFirst  = status.arrowBleedSkipFirst;
     isSpAttackHit        = status.IsSpAttackHit;
     afterRegionBarrierHp = status.afterBarrierHp;
     damageDetails        = status.damageDetails;
     afterShieldHp        = status.afterShieldHp;
     afterGrabHp          = status.afterGrabHp;
     isShadowSealing      = status.isShadowSealing;
     aegisParam.Copy(status.aegisParam);
 }
Exemplo n.º 12
0
    public static AtkAttribute CalcPlayerATK(PlayerAtkCalcData calcData)
    {
        AtkAttribute  atkAttribute = new AtkAttribute();
        AttackHitInfo atkInfo      = calcData.atkInfo;

        if (atkInfo != null)
        {
            atkAttribute.Add(atkInfo.atk);
        }
        SkillInfo.SkillParam skillParam = calcData.skillParam;
        if (skillParam != null && atkInfo != null && atkInfo.isSkillReference)
        {
            atkAttribute.Add(skillParam.atk);
        }
        if (atkInfo == null)
        {
            atkAttribute.Add(calcData.weaponAtk);
        }
        else if (atkInfo.IsReferenceAtkValue)
        {
            atkAttribute.Add(calcData.weaponAtk);
        }
        atkAttribute.normal += calcData.statusAtk;
        atkAttribute.Add(calcData.guardEquipAtk);
        float        num           = atkAttribute.normal;
        ELEMENT_TYPE eLEMENT_TYPE  = atkAttribute.GetElementType();
        AtkAttribute atkAttribute2 = new AtkAttribute();

        atkAttribute2.Copy(atkAttribute);
        atkAttribute2.Mul(calcData.passiveAtkRate);
        atkAttribute.Add(atkAttribute2);
        atkAttribute.Add(calcData.passiveAtkConstant);
        if (calcData.passiveAtkAllElementConstant != 0f)
        {
            atkAttribute.AddElementValueWithCheck(calcData.passiveAtkAllElementConstant);
        }
        atkAttribute.CheckMinus();
        AtkAttribute atkAttribute3 = new AtkAttribute();

        atkAttribute3.Copy(atkAttribute);
        atkAttribute3.Mul(calcData.buffAtkRate);
        atkAttribute.Add(atkAttribute3);
        atkAttribute.Add(calcData.buffAtkConstant);
        if (calcData.buffAtkAllElementConstant > 0f)
        {
            atkAttribute.AddElementValueWithCheck(calcData.buffAtkAllElementConstant);
        }
        if (skillParam != null && atkInfo != null && atkInfo.isSkillReference)
        {
            if (skillParam.tableData.skillAtkType == ELEMENT_TYPE.MAX)
            {
                eLEMENT_TYPE = ELEMENT_TYPE.MAX;
            }
            else
            {
                num = 0f;
            }
            atkAttribute.ChangeElementType(skillParam.tableData.skillAtkType);
            atkAttribute.Mul(skillParam.atkRate);
        }
        else if (calcData.isAtkElementOnly && eLEMENT_TYPE != ELEMENT_TYPE.MAX)
        {
            num = 0f;
            atkAttribute.ChangeElementType(eLEMENT_TYPE);
        }
        atkAttribute.CheckMinus();
        if (num > 0f && atkAttribute.normal < 1f)
        {
            atkAttribute.normal = 1f;
        }
        if (eLEMENT_TYPE != ELEMENT_TYPE.MAX && atkAttribute.GetElementType() == ELEMENT_TYPE.MAX)
        {
            atkAttribute.SetTargetElement(eLEMENT_TYPE, 1f);
        }
        return(atkAttribute);
    }
Exemplo n.º 13
0
 protected void SetExAtk(AtkAttribute atk)
 {
     m_exAtk = atk;
 }
Exemplo n.º 14
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();
        }
    }
Exemplo n.º 15
0
 public static AnimEventShot CreateByExternalBulletData(BulletData exBulletData, StageObject stageObj, AttackInfo atkInfo, Vector3 pos, Quaternion rot, AtkAttribute exAtk = null, Player.ATTACK_MODE attackMode = Player.ATTACK_MODE.NONE, SkillInfo.SkillParam exSkillParam = null)
 {
     //IL_0020: Unknown result type (might be due to invalid IL or missing references)
     //IL_0021: Unknown result type (might be due to invalid IL or missing references)
     if (exBulletData == null)
     {
         Log.Error("exBulletData is null !!");
         return(null);
     }
     return(Create(stageObj, atkInfo, pos, rot, null, true, null, exBulletData, exAtk, attackMode, null, exSkillParam));
 }
    }    //IL_0001: Unknown result type (might be due to invalid IL or missing references)

    //IL_0006: Unknown result type (might be due to invalid IL or missing references)


    public void Initialize(StageObject attacker, StageObject target, AttackInfo atkInfo)
    {
        //IL_0124: Unknown result type (might be due to invalid IL or missing references)
        //IL_0129: Unknown result type (might be due to invalid IL or missing references)
        //IL_01fe: Unknown result type (might be due to invalid IL or missing references)
        //IL_0203: Expected O, but got Unknown
        //IL_0236: Unknown result type (might be due to invalid IL or missing references)
        //IL_023b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0254: Unknown result type (might be due to invalid IL or missing references)
        //IL_0259: Unknown result type (might be due to invalid IL or missing references)
        //IL_0261: Unknown result type (might be due to invalid IL or missing references)
        //IL_0266: Unknown result type (might be due to invalid IL or missing references)
        //IL_0276: Unknown result type (might be due to invalid IL or missing references)
        //IL_027b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0288: Unknown result type (might be due to invalid IL or missing references)
        //IL_0293: Unknown result type (might be due to invalid IL or missing references)
        //IL_029d: Unknown result type (might be due to invalid IL or missing references)
        //IL_02a2: 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_02bb: Unknown result type (might be due to invalid IL or missing references)
        //IL_02c8: 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_02e3: Expected O, but got Unknown
        //IL_02f2: Unknown result type (might be due to invalid IL or missing references)
        //IL_0304: Unknown result type (might be due to invalid IL or missing references)
        //IL_0309: Unknown result type (might be due to invalid IL or missing references)
        //IL_0315: 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_0327: Expected O, but got Unknown
        if (attacker == null)
        {
            RequestDestroy();
        }
        else
        {
            m_atkInfo  = atkInfo;
            m_attacker = attacker;
            m_target   = target;
            if (m_attacker is Player)
            {
                Player player = m_attacker as Player;
                if (player != null)
                {
                    m_attackerPlayer = player;
                    m_attackMode     = player.attackMode;
                }
            }
            if (m_attacker is Enemy)
            {
                Enemy enemy = m_attacker as Enemy;
                if (enemy != null)
                {
                    m_attackerEnemy = enemy;
                }
            }
            BulletData bulletData = null;
            if (atkInfo != null)
            {
                bulletData = atkInfo.bulletData;
            }
            else
            {
                Player player2 = attacker as Player;
                if (player2 != null)
                {
                    AtkAttribute atk = new AtkAttribute();
                    player2.GetAtk(null, ref atk);
                    PlayerAttackAttribute = atk;
                    SkillInfo.SkillParam actSkillParam = player2.skillInfo.actSkillParam;
                    if (actSkillParam != null)
                    {
                        bulletData          = actSkillParam.bullet;
                        m_atkInfoNames      = actSkillParam.tableData.attackInfoNames;
                        SkillParamForBullet = actSkillParam;
                    }
                    if (player2.targetingPoint != null)
                    {
                        m_targetingPoint = player2.targetingPoint.param.targetPos;
                    }
                }
            }
            if (bulletData == null)
            {
                RequestDestroy();
            }
            else
            {
                m_aliveTimer = bulletData.data.appearTime;
                BulletData.BulletTracking dataTracking = bulletData.dataTracking;
                if (dataTracking == null)
                {
                    RequestDestroy();
                }
                else
                {
                    m_trackingData        = dataTracking;
                    m_isDeleted           = false;
                    m_isEmitting          = false;
                    m_moveThreshold       = dataTracking.moveThreshold;
                    m_attackIntervalTimer = dataTracking.attackInterval;
                    m_emitInterval        = dataTracking.emitInterval;
                    m_emissionNum         = dataTracking.emissionNum;
                    if (m_emissionNum > 0)
                    {
                        m_exAtkList       = new AtkAttribute[m_emissionNum];
                        m_moveSpeed       = bulletData.data.speed;
                        m_cachedTransform = this.get_transform();
                        m_cachedTransform.set_parent((!MonoBehaviourSingleton <StageObjectManager> .IsValid()) ? MonoBehaviourSingleton <EffectManager> .I._transform : MonoBehaviourSingleton <StageObjectManager> .I._transform);
                        Vector3 position = Vector3.get_zero();
                        position   = ((m_target != null) ? m_target._position : ((!(m_targetingPoint != Vector3.get_zero())) ? (m_attacker._position + m_attacker._forward * 2f) : m_targetingPoint));
                        position.y = 0f;
                        m_cachedTransform.set_position(position);
                        m_cachedTransform.set_rotation(Quaternion.get_identity());
                        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>();
                        RequestMain();
                    }
                    else
                    {
                        Log.Error("BulletTracking.emissionNum is zero!!");
                        RequestDestroy();
                    }
                }
            }
        }
    }
Exemplo n.º 17
0
    public static AnimEventShot Create(StageObject stage_object, AttackInfo atk_info, Vector3 pos, Quaternion rot, GameObject attach_object = null, bool isScaling = true, string change_effect = null, BulletData exBulletData = null, AtkAttribute exAtk = null, Player.ATTACK_MODE attackMode = Player.ATTACK_MODE.NONE, DamageDistanceTable.DamageDistanceData damageDistanceData = null, SkillInfo.SkillParam exSkillParam = null)
    {
        //IL_009f: Unknown result type (might be due to invalid IL or missing references)
        //IL_00b3: Unknown result type (might be due to invalid IL or missing references)
        //IL_00b8: Unknown result type (might be due to invalid IL or missing references)
        //IL_00bd: Expected O, but got Unknown
        //IL_00c3: Unknown result type (might be due to invalid IL or missing references)
        //IL_00d4: Unknown result type (might be due to invalid IL or missing references)
        //IL_0100: Unknown result type (might be due to invalid IL or missing references)
        //IL_0101: Unknown result type (might be due to invalid IL or missing references)
        BulletData bulletData = atk_info.bulletData;

        if (exBulletData != null)
        {
            bulletData = exBulletData;
        }
        if (atk_info.isBulletSkillReference)
        {
            Player player = stage_object as Player;
            if (player != null)
            {
                SkillInfo.SkillParam actSkillParam = player.skillInfo.actSkillParam;
                if (actSkillParam != null)
                {
                    bulletData = actSkillParam.bullet;
                }
            }
        }
        if (bulletData == null)
        {
            Log.Error("Failed to shoot bullet!! atk_info:" + ((atk_info == null) ? string.Empty : atk_info.name));
            return(null);
        }
        Transform     val           = Utility.CreateGameObject(bulletData.get_name(), MonoBehaviourSingleton <StageObjectManager> .I._transform, -1);
        AnimEventShot animEventShot = val.get_gameObject().AddComponent <AnimEventShot>();

        if (isScaling)
        {
            Transform val2 = stage_object.get_gameObject().get_transform();
            animEventShot.SetBaseScale(val2.get_lossyScale());
        }
        else
        {
            animEventShot.SetBaseScale(Vector3.get_one());
        }
        animEventShot.SetAttachObject(attach_object);
        if (bulletData.type == BulletData.BULLET_TYPE.BREAKABLE)
        {
            animEventShot.SetTargetPoint();
        }
        animEventShot.Shot(stage_object, atk_info, bulletData, pos, rot, change_effect, true, exAtk, attackMode, damageDistanceData, exSkillParam);
        return(animEventShot);
    }