Functioning player movement,

Persistent block needs to be implemented
This commit is contained in:
RochesterX
2025-01-31 12:48:13 -05:00
parent 36815eb876
commit 70518b2b69
7 changed files with 189 additions and 306 deletions

View File

@@ -12,9 +12,12 @@ public class Damageable : MonoBehaviour
{
if (collision.gameObject.CompareTag("Punch Hurtbox"))
{
print($"{name}: Ouch");
Damage();
Recoil(collision.transform.parent.gameObject);
if (GetComponent<Block>().blocking)
{
collision.gameObject.GetComponent<Damageable>().Damage(gameObject);
return;
}
Damage(collision.transform.parent.gameObject);
}
}
@@ -24,9 +27,10 @@ public class Damageable : MonoBehaviour
//damageSource.transform.localScale *= 1.1f;
}
private void Damage()
public void Damage(GameObject source)
{
damage += force;
Recoil(source);
}
public void ResetDamage()