|
|
@@ -112,7 +112,8 @@ public class Character : MonoBehaviour
|
|
|
public List<AttackInfo> attack2Infos; //普攻2信息
|
|
|
public List<AttackTrigger> attackTriggers; //普攻触发器,敌方进入后播放动画进行攻击
|
|
|
public GameObject addAttackEffect;
|
|
|
- public int[] curDamage;
|
|
|
+ public int[] curDamage1;
|
|
|
+ public int[] curDamage2;
|
|
|
|
|
|
[Header("目标")]
|
|
|
public List<TargetType> targetTypes;
|
|
|
@@ -183,10 +184,15 @@ public class Character : MonoBehaviour
|
|
|
{
|
|
|
rope = null;
|
|
|
}
|
|
|
- curDamage = new int[attack1Infos.Count];
|
|
|
- for(int i = 0; i < attack1Infos.Count; i++)
|
|
|
+ curDamage1 = new int[attack1Infos.Count];
|
|
|
+ for (int i = 0; i < attack1Infos.Count; i++)
|
|
|
{
|
|
|
- curDamage[i] = attack1Infos[i].damage;
|
|
|
+ curDamage1[i] = attack1Infos[i].damage;
|
|
|
+ }
|
|
|
+ curDamage2 = new int[attack2Infos.Count];
|
|
|
+ for (int i = 0; i < attack2Infos.Count; i++)
|
|
|
+ {
|
|
|
+ curDamage2[i] = attack2Infos[i].damage;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -296,7 +302,7 @@ public class Character : MonoBehaviour
|
|
|
case AttackType.Melee:
|
|
|
for (int i = 0; i < attack1Infos.Count; i++)
|
|
|
{
|
|
|
- attackTriggers[i].damage = curDamage[i];
|
|
|
+ attackTriggers[i].damage = curDamage1[i];
|
|
|
attackTriggers[i].changeHurt = attack1Infos[i].changeHurt;
|
|
|
attackTriggers[i].repelValue = attack1Infos[i].repelValue;
|
|
|
Vector3 attackDir = attack1Infos[i].attackDir.normalized;
|
|
|
@@ -345,7 +351,7 @@ public class Character : MonoBehaviour
|
|
|
case AttackType.Dash:
|
|
|
for (int i = 0; i < attack2Infos.Count; i++)
|
|
|
{
|
|
|
- attackTriggers[i].damage = curDamage[i];
|
|
|
+ attackTriggers[i].damage = curDamage2[i];
|
|
|
attackTriggers[i].changeHurt = attack2Infos[i].changeHurt;
|
|
|
attackTriggers[i].repelValue = attack2Infos[i].repelValue;
|
|
|
Vector3 attackDir = attack2Infos[i].attackDir.normalized;
|