コード例 #1
0
ファイル: DestroyEscape.cs プロジェクト: nasa03/RSG
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.CompareTag("Player"))
     {
         if (Jet.GetEscape())
         {
             levelfinish.ShowStats(true, false);
         }
     }
 }
コード例 #2
0
    public void Interact() //ugly as sin but only called once per interaction so not really that bad. can be optimized later
    {
        // Hanger door, clearance, pilots notes
        if (!hangerdoor && !clearance && !pilotsnotes)
        {
            textbox.DisplayText("Eliminate doesn't necessarily mean 'blow it up'... right?");
        }

        else if (hangerdoor && !clearance && !pilotsnotes)
        {
            textbox.DisplayText("The hanger doors are open, I just gotta figure out how to fly this thing");
        }
        else if (!hangerdoor && clearance && !pilotsnotes)
        {
            textbox.DisplayText("I've got clearance to take off, but the hanger doors are closed and I don't know the take off procedure");
        }
        else if (!hangerdoor && !clearance && pilotsnotes)
        {
            textbox.DisplayText("I know the take off procedure, but the hanger doors are closed");
        }
        else if (!hangerdoor && clearance && pilotsnotes)
        {
            textbox.DisplayText("Got clearance, Got the take off procedure, just need to open the hangar doors");
        }
        else if (hangerdoor && !clearance && pilotsnotes)
        {
            finishlevel.ShowStats(false, false);
        }
        else if (hangerdoor && clearance && !pilotsnotes)
        {
            textbox.DisplayText("Hanger doors are open and I have clearance, but I still need to figure out how to take off");
        }
        else if (hangerdoor && clearance && pilotsnotes)
        {
            finishlevel.ShowStats(false, true);
        }
    }