private void AddEnemyToRadar(TrackedEnemy enemy) { // Get an inactive dot var dot = _dots.Find(item => !item.gameObject.activeSelf); var enemyPositionRelatedToPlayer = _player.transform.InverseTransformPoint(enemy.transform.position); var scaleFactor = _centerRadius / _enemyContainer.ColliderRadius; var dotPosition = enemyPositionRelatedToPlayer * scaleFactor; PlaceDotOnUi(dot, dotPosition); //Activate the dot dot.gameObject.SetActive(true); }
public void RemoveEnemy(TrackedEnemy enemy) { _enemyList.Remove(enemy); }
public void RemoveEnemy(TrackedEnemy enemy) { _enemyContainer.RemoveEnemy(enemy); }