コード例 #1
0
    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);
    }
コード例 #2
0
    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);
        }
    }
コード例 #3
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();
        }
    }