Answer the question
In order to leave comments, you need to log in
How to fix error CS0117: 'Physics2D' does not contain a definition for 'OverlapArena'?
private void CheckTouchDamage()
{
if(Time.time >= lastTouchDamageTime + touchDamageCooldown)
{
touchDamageBotLeft.Set(touchDamageCheck.position.x - (touchDamageWidth / 2), touchDamageCheck.position.y - (touchDamageHeight / 2));
touchDamageTopRight.Set(touchDamageCheck.position.x + (touchDamageWidth / 2), touchDamageCheck.position.y + (touchDamageHeight / 2));
Collider2D hit = Physics2D.OverlapArena(touchDamageBotLeft, touchDamageTopRight, whatIsPlayer);
if(hit != null)
{
lastTouchDamageTime = Time.time;
attackDetails[0] = touchDamage;
attackDetails[1] = alive.transform.position.x;
hit.SendMessage("Damage", attackDetails);
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question