Beispiel #1
0
    private void Update()
    {
        if (_SpaceshipTransform == null)
        {
            _Spawner.ReturnAsteroid(gameObject);
            return;
        }
        var dist = Vector3.Distance(_Transform.position, _SpaceshipTransform.position);

        if (dist > _DestructionDist)
        {
            Destroy();
        }
    }