Exemplo n.º 1
0
    private void OnDrawGizmos()
    {
        if (_currentInteractionEntity != null)
        {
            Gizmos.DrawLine(transform.position, _currentInteractionEntity.GetIteractPoint());
        }

        if (_currentEnemy != null)
        {
            Gizmos.DrawLine(transform.position, _currentEnemy.transform.position);
        }
    }
Exemplo n.º 2
0
    private void Update()
    {
        if (AttachedEntity != null)
        {
            _transform.anchoredPosition = (Vector2)_camera.WorldToScreenPoint(AttachedEntity.GetIteractPoint()) + Offset;
        }

        else
        {
            gameObject.SetActive(false);
        }
    }