예제 #1
0
    private IEnumerator ShipDeathSequence()
    {
        playerUIManager.DisconnectCastleShip(CastleShip);

        Vector3 scale = this.transform.localScale;
        float   timer = 0;

        Time.timeScale = 0.3f;
        while (timer < 2)
        {
            timer += Time.unscaledDeltaTime;

            //float completion = timer / 3;

            //this.transform.localScale = Vector3.Lerp(scale, Vector3.zero, completion);

            yield return(null);
        }
        Time.timeScale = 1f;

        RemoveShip();
        if (ai)
        {
            ChangeToPlaying();
        }
        else
        {
            ChangeToShipSelection();
        }
    }