public void OnCollision(Vector2Int nextStep) { var otherCharacter = field.GetGameObjectByIndex <Character>(nextStep); if (otherCharacter is null) { return; } if (otherCharacter.SquadType == squadType) { return; } attack.AddCollisionTarget(otherCharacter.health); otherCharacter.attack.AddCollisionTarget(health); otherCharacter.Stop(); }