|
|
@@ -56,29 +56,6 @@ public class Block : Character
|
|
|
{
|
|
|
curWarning = Instantiate(warning, posYZ, new Quaternion(0, 0, 0, 0), transform);
|
|
|
curWarning.SetActive(false);
|
|
|
- SetAttackTrigger(0);
|
|
|
- }
|
|
|
-
|
|
|
- private void SetAttackTrigger(int id)
|
|
|
- {
|
|
|
- AttackInfo attack = new AttackInfo();
|
|
|
- switch (id)
|
|
|
- {
|
|
|
- case 0:
|
|
|
- attack = outDamage;
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- attackTriggers[id].damage = attack.damage;
|
|
|
- attackTriggers[id].changeHurt = attack.changeHurt;
|
|
|
- attackTriggers[id].repelValue = attack.repelValue;
|
|
|
- Vector3 attackDir = attack.attackDir.normalized;
|
|
|
- if (bodyTrans.localScale.x < 0)
|
|
|
- {
|
|
|
- attackDir.x = -attackDir.x;
|
|
|
- }
|
|
|
- attackTriggers[id].force = attackDir * attack.force;
|
|
|
}
|
|
|
|
|
|
private void OnEnable()
|
|
|
@@ -185,7 +162,6 @@ public class Block : Character
|
|
|
{
|
|
|
case State.outGround:
|
|
|
rb.velocity = Vector3.zero;
|
|
|
- attackTriggers[0].enabled = false;
|
|
|
break;
|
|
|
case State.charge:
|
|
|
break;
|
|
|
@@ -219,7 +195,6 @@ public class Block : Character
|
|
|
break;
|
|
|
case State.none:
|
|
|
rb.velocity = Vector3.zero;
|
|
|
- attackTriggers[0].enabled = false;
|
|
|
break;
|
|
|
case State.back:
|
|
|
rb.useGravity = true;
|