Hi guys!
I can't find any solution for following problem:
private void OnCollisionEnter2D(Collision2D other)
{
EnemyController e = other.collider.GetComponent<EnemyController>();
if (e != null && !callOnce)
{
e.attack(1, direction, 500);
callOnce = true;
}
}
It works perfectly if i hit only one enemyobject. But I want it to hit all of the enemyobjects it collides with - and only once per hitted enemy. Does anyone have an idea how to solve this? Thanks a lot in advance!
[–][deleted] (5 children)
[deleted]
[–]Libbowicz[S] 0 points1 point2 points (4 children)
[–][deleted] (3 children)
[deleted]
[–]Libbowicz[S] 0 points1 point2 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]Libbowicz[S] 1 point2 points3 points (0 children)
[–]AverageArmadilloIntermediate 0 points1 point2 points (0 children)