Exemple #1
0
 private void Done()
 {
     Destroy(gameObject);
     if (Island.I.warningPresent)
     {
         FailedUI.Fail("Tried to explore the island without proper Lockout/Tagout.");
     }
 }
Exemple #2
0
 public void CallPirate()
 {
     if (!needsPirate)
     {
         FailedUI.Fail("Uneccessarily called the authorized pirate. They tripped and hurt themselves running over.");
     }
     else if (!calledPirate && _authorizedPirateTimer <= 0f)
     {
         Island.I.paused = true;
         // Start timer
         _authorizedPirateTimer = 5f;
     }
 }
Exemple #3
0
    private IEnumerator Leave()
    {
        const float leaveTime = 5f;

        // Hide UIs
        islandUI.HideWarning();
        islandUI.HideExit();

        // Leave
        ship.Leave(leaveTime);
        interactable = false;

        // Tween out
        Tween t = transform.DOMoveX(10f, leaveTime).SetEase(Ease.InQuad);

        yield return(t.WaitForCompletion());

        // Back to location manager
        if (warningPresent)
        {
            // Failed
            FailedUI.Fail("Didn't explore the island, your crew is mad at you for the lost gold.");
        }
        else if (!exitConfirmed)
        {
            FailedUI.Fail("Didn't remove the island trap tags, the navy finds you using the evidence left behind.");
        }
        else
        {
            // Succeeded
            GM.gold        += collectedValue;
            GM.teamGold    += collectedValue;
            _collectedValue = 0;
            SceneManager.LoadScene("Ocean");
        }
    }