Example #1
0
    private void HandleSkyhookLanding()
    {
        if (shipFlier == null)
        {
            return;
        }

        if (!shipFlier.Launched)
        {
            return;
        }

        transform.position = shipFlier.GetNewPos();

        if (!landing)
        {
            return;
        }

        if (shipFlier.ReachedDestination())
        {
            onLanded?.Invoke(tripToEnd);
            Destroy(gameObject);
        }
    }
Example #2
0
    private void Update()
    {
        if (!shipFlier.Launched)
        {
            return;
        }

        transform.position = shipFlier.GetNewPos();
    }