public void IncreaseGauge(AttackHitInfo.ATTACK_TYPE atkType, Player.ATTACK_MODE atkMode, int index)
    {
        if (execEvolveId == 0)
        {
            float num = _GetIncreaseValue(atkType, atkMode);
            if (!(num <= 0f))
            {
                float num2 = gauge[index];
                gauge[index] += owner.CalcWaveMatchSpGauge(num);
                if (gauge[index] > 1000f)
                {
                    gauge[index] = 1000f;
                }
                if (isSelf && index == owner.weaponIndex && num2 != gauge[index])
                {
                    MonoBehaviourSingleton <UIPlayerStatus> .I.SetEvolveRate(gauge[index] / 1000f);

                    MonoBehaviourSingleton <UIEnduranceStatus> .I.SetEvolveRate(gauge[index] / 1000f);

                    if (IsGaugeFull())
                    {
                        MonoBehaviourSingleton <UIPlayerStatus> .I.PlayChangeEvolveIcon(true);

                        MonoBehaviourSingleton <UIEnduranceStatus> .I.PlayChangeEvolveIcon(true);
                    }
                }
            }
        }
    }
    public void SetupWeakPoint(int weakType, Player.ATTACK_MODE attackMode, float displayTime = 0f, string deleteAttackName = "", int validElement = -1)
    {
        displayTimer     = displayTime;
        deleteAtkName    = deleteAttackName;
        validElementType = validElement;
        switch (weakType)
        {
        case 0:
            weakState = Enemy.WEAK_STATE.WEAK;
            break;

        case 1:
            weakState = Enemy.WEAK_STATE.DOWN;
            break;

        case 2:
            weakState = Enemy.WEAK_STATE.WEAK_SP_ATTACK;
            break;

        case 3:
            weakState = Enemy.WEAK_STATE.WEAK_SP_DOWN_MAX;
            break;

        case 5:
            weakState = Enemy.WEAK_STATE.WEAK_ELEMENT_ATTACK;
            break;

        case 6:
            weakState = Enemy.WEAK_STATE.WEAK_ELEMENT_SKILL_ATTACK;
            break;

        case 7:
            weakState = Enemy.WEAK_STATE.WEAK_SKILL_ATTACK;
            break;

        case 8:
            weakState = Enemy.WEAK_STATE.WEAK_HEAL_ATTACK;
            break;

        case 9:
            weakState = Enemy.WEAK_STATE.WEAK_GRAB;
            break;

        case 10:
            weakState = Enemy.WEAK_STATE.WEAK_CANNON;
            break;
        }
        if (attackMode != 0)
        {
            weakSubParam = (int)attackMode;
        }
        if (Enemy.IsWeakStateSpAttack(weakState) && weakSubParam < 0)
        {
            ResetWeakState();
        }
        weakAttackIDs.Clear();
    }
 public override AtkAttribute GetDamageRate(Character chara, AttackedHitStatusLocal status)
 {
     Player.ATTACK_MODE attackMode = player.attackMode;
     if (status.attackMode != 0)
     {
         attackMode = status.attackMode;
     }
     if (attackMode != mode)
     {
         return(null);
     }
     return(attr);
 }
    private float _GetIncreaseValue(AttackHitInfo.ATTACK_TYPE atkType, Player.ATTACK_MODE atkMode)
    {
        EQUIPMENT_TYPE eQUIPMENT_TYPE = Player.ConvertAttackModeToEquipmentType(atkMode);
        int            i = 0;

        for (int num = parameter.gaugeInfo.Length; i < num; i++)
        {
            InGameSettingsManager.Evolve.GaugeInfo gaugeInfo = parameter.gaugeInfo[i];
            if (gaugeInfo.type == eQUIPMENT_TYPE)
            {
                return(gaugeInfo.value);
            }
        }
        return(0f);
    }
    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);
    }
Esempio n. 6
0
 protected void SetAttackMode(Player.ATTACK_MODE attackMode)
 {
     m_attackMode = attackMode;
 }
 public void IncreaseCurrentGauge(AttackHitInfo.ATTACK_TYPE atkType, Player.ATTACK_MODE atkMode)
 {
     IncreaseGauge(atkType, atkMode, owner.weaponIndex);
 }
    private TargetPoint DecideFinalTargetPoint(TargetPoint nextTargetPoint, TargetPoint nowTargetPoint, Player.ATTACK_MODE attackMode)
    {
        bool flag = false;

        if (targetingTime == 0f || Time.get_time() - targetingTime >= parameter.changeAbleTime)
        {
            flag = true;
        }
        bool flag2 = true;
        bool flag3 = false;

        if (nextTargetPoint != null)
        {
            TargetPoint.Param param = nextTargetPoint.param;
            param.targetSelectCounter += Time.get_deltaTime();
            if (param.targetSelectCounter < parameter.selectAbleTime)
            {
                flag2 = false;
            }
            switch (param.weakState)
            {
            case Enemy.WEAK_STATE.WEAK:
                flag3 = true;
                break;

            case Enemy.WEAK_STATE.WEAK_SP_ATTACK:
            case Enemy.WEAK_STATE.WEAK_SP_DOWN_MAX:
                if (param.weakSubParam == (int)attackMode)
                {
                    flag3 = true;
                }
                break;
            }
        }
        bool flag4 = false;

        if (flag3)
        {
            flag4 = true;
        }
        flag3 = false;
        if (nowTargetPoint != null)
        {
            switch (nowTargetPoint.param.weakState)
            {
            case Enemy.WEAK_STATE.WEAK:
                flag3 = true;
                break;

            case Enemy.WEAK_STATE.WEAK_SP_ATTACK:
            case Enemy.WEAK_STATE.WEAK_SP_DOWN_MAX:
                if (nowTargetPoint.param.weakSubParam == (int)attackMode)
                {
                    flag3 = true;
                }
                break;
            }
        }
        bool flag5 = false;

        if (flag3)
        {
            flag5 = true;
            if (targetingWeakTime <= 0f)
            {
                targetingWeakTime = Time.get_time();
            }
            if (Time.get_time() - targetingWeakTime >= parameter.changeWeakTime)
            {
                flag5 = false;
            }
        }
        else
        {
            targetingWeakTime = 0f;
        }
        bool flag6 = false;

        if (((flag && flag2) || flag4 || nowTargetPoint == null) && !flag5)
        {
            flag6 = true;
        }
        bool flag7 = false;

        if (nowTargetPoint != null)
        {
            Enemy enemy = nowTargetPoint.owner as Enemy;
            if (enemy != null && !enemy.isDead && enemy.enableTargetPoint)
            {
                flag7 = true;
            }
        }
        if ((!isTargetLock && flag6) || !flag7 || isTargetDisable)
        {
            if (nextTargetPoint != null)
            {
                if (nowTargetPoint != nextTargetPoint)
                {
                    nowTargetPoint    = nextTargetPoint;
                    targetingTime     = Time.get_time();
                    targetingWeakTime = 0f;
                }
                nextTargetPoint.param.targetSelectCounter = 0f;
            }
            else
            {
                nowTargetPoint = null;
            }
            isTargetLock = false;
        }
        return(nowTargetPoint);
    }
Esempio n. 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();
        }
    }
    }    //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();
                    }
                }
            }
        }
    }
 public void SetAttackMode(Player.ATTACK_MODE attackMode)
 {
     m_attackMode = attackMode;
 }
Esempio n. 12
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);
    }
Esempio n. 13
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));
 }
 public override void init(Player _player, string target, int val)
 {
     base.init(_player, target, val);
     mode = (Player.ATTACK_MODE)(int) Enum.Parse(typeof(Player.ATTACK_MODE), target);
 }