JohnsterSpaceProgram

GameController Test Char RNG Script

Jan 2nd, 2020
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 23.52 KB | None | 0 0
  1. using System;
  2. using UnityEngine;
  3. using UnityEngine.SceneManagement;
  4. using UnityEngine.UI;
  5.  
  6. // Token: 0x0200001F RID: 31
  7. public class GameControllerScript : MonoBehaviour
  8. {
  9.     // Token: 0x06000080 RID: 128 RVA: 0x0000438C File Offset: 0x0000278C
  10.     public GameControllerScript()
  11.     {
  12.         int[] array = new int[5];
  13.         array[0] = -160;
  14.         array[1] = -120;
  15.         array[2] = -80;
  16.         array[3] = -40;
  17.         this.itemSelectOffset = array;
  18.     }
  19.  
  20.     // Token: 0x06000081 RID: 129 RVA: 0x00004448 File Offset: 0x00002848
  21.     private void Start()
  22.     {
  23.         this.audioDevice = base.GetComponent<AudioSource>(); //Get the Audio Source
  24.         this.mode = PlayerPrefs.GetString("CurrentMode"); //Get the current mode
  25.         if (this.mode == "endless") //If it is endless mode
  26.         {
  27.             this.baldiScrpt.endless = true; //Set Baldi use his slightly changed endless anger system
  28.         }
  29.         this.schoolMusic.Play(); //Play the school music
  30.         this.LockMouse(); //Prevent the mouse from moving
  31.         this.UpdateNotebookCount(); //Update the notebook count
  32.         this.itemSelected = 0; //Set selection to item slot 0(the first item slot)
  33.         this.gameOverDelay = 0.5f;
  34.     }
  35.  
  36.     // Token: 0x06000082 RID: 130 RVA: 0x000044BC File Offset: 0x000028BC
  37.     private void Update()
  38.     {
  39.         if (!this.learningActive)
  40.         {
  41.             if (Input.GetButtonDown("Pause"))
  42.             {
  43.                 if (!this.gamePaused)
  44.                 {
  45.                     this.PauseGame();
  46.                 }
  47.                 else
  48.                 {
  49.                     this.UnpauseGame();
  50.                 }
  51.             }
  52.             if (Input.GetKeyDown(KeyCode.Y) & this.gamePaused)
  53.             {
  54.                 SceneManager.LoadScene("MainMenu");
  55.             }
  56.             else if (Input.GetKeyDown(KeyCode.N) & this.gamePaused)
  57.             {
  58.                 this.UnpauseGame();
  59.             }
  60.             if (!this.gamePaused & Time.timeScale != 1f)
  61.             {
  62.                 Time.timeScale = 1f;
  63.             }
  64.             if (Input.GetMouseButtonDown(1))
  65.             {
  66.                 this.UseItem();
  67.             }
  68.             if (Input.GetAxis("Mouse ScrollWheel") > 0f)
  69.             {
  70.                 this.DecreaseItemSelection();
  71.             }
  72.             else if (Input.GetAxis("Mouse ScrollWheel") < 0f)
  73.             {
  74.                 this.IncreaseItemSelection();
  75.             }
  76.             if (Input.GetKeyDown(KeyCode.Alpha1))
  77.             {
  78.                 this.itemSelected = 0;
  79.                 this.UpdateItemSelection();
  80.             }
  81.             else if (Input.GetKeyDown(KeyCode.Alpha2))
  82.             {
  83.                 this.itemSelected = 1;
  84.                 this.UpdateItemSelection();
  85.             }
  86.             else if (Input.GetKeyDown(KeyCode.Alpha3))
  87.             {
  88.                 this.itemSelected = 2;
  89.                 this.UpdateItemSelection();
  90.             }
  91.             else if (Input.GetKeyDown(KeyCode.Alpha4))
  92.             {
  93.                 this.itemSelected = 3;
  94.                 this.UpdateItemSelection();
  95.             }
  96.             else if (Input.GetKeyDown(KeyCode.Alpha5))
  97.             {
  98.                 this.itemSelected = 4;
  99.                 this.UpdateItemSelection();
  100.             }
  101.         }
  102.         else if (Time.timeScale != 0f)
  103.         {
  104.             Time.timeScale = 0f;
  105.         }
  106.         if (this.player.stamina < 0f & !this.warning.activeSelf)
  107.         {
  108.             this.warning.SetActive(true); //Set the warning text to be visible
  109.         }
  110.         else if (this.player.stamina > 0f & this.warning.activeSelf)
  111.         {
  112.             this.warning.SetActive(false); //Set the warning text to be invisible
  113.         }
  114.         if (this.player.gameOver)
  115.         {
  116.             Time.timeScale = 0f; //Pause the game
  117.             this.gameOverDelay -= Time.unscaledDeltaTime;
  118.             this.audioDevice.PlayOneShot(this.aud_buzz); //Play the jumpscare sound
  119.             if (this.gameOverDelay <= 0f)
  120.             {
  121.                 if (this.mode == "endless") //If it is in endless
  122.                 {
  123.                     if (this.notebooks > PlayerPrefs.GetInt("HighBooks")) //If the player achieved a new score
  124.                     {
  125.                         PlayerPrefs.SetInt("HighBooks", this.notebooks); //Update the high score
  126.                         PlayerPrefs.SetInt("HighTime", Mathf.FloorToInt(this.time)); //(Unused) Update the time
  127.                         this.highScoreText.SetActive(true); // "WOW KAZOW! THATS A NEW HIGH SCORE!"
  128.                     }
  129.                     else if (this.notebooks == PlayerPrefs.GetInt("HighBooks") & Mathf.FloorToInt(this.time) > PlayerPrefs.GetInt("HighTime")) //(Unused) If the player has a brand new record for time
  130.                     {
  131.                         PlayerPrefs.SetInt("HighTime", Mathf.FloorToInt(this.time)); //Update the high time
  132.                         this.highScoreText.SetActive(true); // "WOW KAZOW! THATS A NEW HIGH SCORE!"
  133.                     }
  134.                     PlayerPrefs.SetInt("CurrentBooks", this.notebooks); //Update the high score
  135.                     PlayerPrefs.SetInt("CurrentTime", Mathf.FloorToInt(this.time)); //(Unused) Update the time
  136.                 }
  137.                 Time.timeScale = 1f; // Unpause the game
  138.                 SceneManager.LoadScene("GameOver"); // Go to the game over screen
  139.             }
  140.         }
  141.         if (this.finaleMode && !this.audioDevice.isPlaying && this.exitsReached == 3) //Play the weird sound after getting some exits
  142.         {
  143.             this.audioDevice.clip = this.aud_MachineLoop;
  144.             this.audioDevice.loop = true;
  145.             this.audioDevice.Play();
  146.         }
  147.         this.time += Time.deltaTime;
  148.     }
  149.  
  150.     // Token: 0x06000083 RID: 131 RVA: 0x00004828 File Offset: 0x00002C28
  151.     private void UpdateNotebookCount()
  152.     {
  153.         if (this.mode == "story")
  154.         {
  155.             this.notebookCount.text = this.notebooks.ToString() + "/7 Notebooks";
  156.         }
  157.         else
  158.         {
  159.             this.notebookCount.text = this.notebooks.ToString() + " Notebooks";
  160.         }
  161.         if (this.notebooks == 7 & this.mode == "story")
  162.         {
  163.             this.ActivateFinaleMode();
  164.         }
  165.     }
  166.  
  167.     // Token: 0x06000084 RID: 132 RVA: 0x000048C0 File Offset: 0x00002CC0
  168.     public void CollectNotebook()
  169.     {
  170.         this.notebooks++;
  171.         this.UpdateNotebookCount();
  172.         this.time = 0f;
  173.     }
  174.  
  175.     // Token: 0x06000085 RID: 133 RVA: 0x000048E1 File Offset: 0x00002CE1
  176.     public void LockMouse()
  177.     {
  178.         if (!this.learningActive)
  179.         {
  180.             this.cursorController.LockCursor(); //Prevent the cursor from moving
  181.             this.mouseLocked = true;
  182.             this.reticle.SetActive(true);
  183.         }
  184.     }
  185.  
  186.     // Token: 0x06000086 RID: 134 RVA: 0x0000490C File Offset: 0x00002D0C
  187.     public void UnlockMouse()
  188.     {
  189.         this.cursorController.UnlockCursor(); //Allow the cursor to move
  190.         this.mouseLocked = false;
  191.         this.reticle.SetActive(false);
  192.     }
  193.  
  194.     // Token: 0x06000087 RID: 135 RVA: 0x0000492C File Offset: 0x00002D2C
  195.     private void PauseGame()
  196.     {
  197.         Time.timeScale = 0f;
  198.         this.gamePaused = true;
  199.         this.pauseText.SetActive(true);
  200.         this.baldiNod.SetActive(true);
  201.         this.baldiShake.SetActive(true);
  202.     }
  203.  
  204.     // Token: 0x06000088 RID: 136 RVA: 0x00004963 File Offset: 0x00002D63
  205.     private void UnpauseGame()
  206.     {
  207.         Time.timeScale = 1f;
  208.         this.gamePaused = false;
  209.         this.pauseText.SetActive(false);
  210.         this.baldiNod.SetActive(false);
  211.         this.baldiShake.SetActive(false);
  212.     }
  213.  
  214.     // Token: 0x06000089 RID: 137 RVA: 0x0000499C File Offset: 0x00002D9C
  215.     public void ActivateSpoopMode()
  216.     {
  217.         this.spoopMode = true; //Tells the game its time for spooky//Lowers all the exits
  218.         this.entrance_0.Lower();
  219.         this.entrance_1.Lower();
  220.         this.entrance_2.Lower();
  221.         this.entrance_3.Lower();
  222.         this.baldiTutor.SetActive(false); //Turns off Baldi(The one that you see at the start of the game)
  223.         this.baldi.SetActive(true); //Turns on Baldi
  224.         this.principal.SetActive(true); //Turns on Principal
  225.         this.crafters.SetActive(true); //Turns on Crafters
  226.         this.playtime.SetActive(true); //Turns on Playtime
  227.         this.gottaSweep.SetActive(true); //Turns on Gotta Sweep
  228.         this.bully.SetActive(true); //Turns on Bully
  229.         this.firstPrize.SetActive(true); //Turns on First-Prize
  230.         this.audioDevice.PlayOneShot(this.aud_Hang); //Plays the hang sound
  231.         this.learnMusic.Stop(); //Stop all the music
  232.         this.schoolMusic.Stop();
  233.         StartCoroutine(RNGC());
  234.     }
  235.  
  236.     public IEnumerator RNGC() //This code isn't perfect
  237.     {
  238.         int values(Random.Range(1,10) //Choose between 1 and 10 for values
  239.         if (this.values > 3) //If the values is less than 3
  240.         {
  241.             this.char2.SetActive(false);
  242.             this.char1.SetActive(true);
  243.             this.char3.SetActive(false);
  244.         }
  245.         else if (this.values < 3 & this.values > 7) //If the values is less than 3 and less than 7
  246.         {
  247.             this.char1.SetActive(false);
  248.             this.char2.SetActive(true);
  249.             this.char3.SetActive(false);
  250.         }
  251.         else if (this.values < 7) //If the values is greater than 7
  252.         {
  253.             this.char1.SetActive(false);
  254.             this.char3.SetActive(true); //Set third character active
  255.             this.char2.SetActive(false);
  256.         }
  257.        
  258.     }
  259.  
  260.     // Token: 0x0600008A RID: 138 RVA: 0x00004A63 File Offset: 0x00002E63
  261.     private void ActivateFinaleMode()
  262.     {
  263.         this.finaleMode = true;
  264.         this.entrance_0.Raise();
  265.         this.entrance_1.Raise();//Raise all the enterances(make them appear)
  266.         this.entrance_2.Raise();
  267.         this.entrance_3.Raise();
  268.     }
  269.  
  270.     // Token: 0x0600008B RID: 139 RVA: 0x00004A98 File Offset: 0x00002E98
  271.     public void GetAngry(float value) //Make Baldi get angry
  272.     {
  273.         if (!this.spoopMode)
  274.         {
  275.             this.ActivateSpoopMode();
  276.         }
  277.         this.baldiScrpt.GetAngry(value);
  278.     }
  279.  
  280.     // Token: 0x0600008C RID: 140 RVA: 0x00004AB7 File Offset: 0x00002EB7
  281.     public void ActivateLearningGame()
  282.     {
  283.         this.learningActive = true;
  284.         this.UnlockMouse(); //Unlock the mouse
  285.         this.tutorBaldi.Stop(); //Make tutor Baldi stop talking
  286.         if (!this.spoopMode) //If the player hasn't gotten a question wrong
  287.         {
  288.             this.schoolMusic.Stop(); //Start playing the learn music
  289.             this.learnMusic.Play();
  290.         }
  291.     }
  292.  
  293.     // Token: 0x0600008D RID: 141 RVA: 0x00004AF4 File Offset: 0x00002EF4
  294.     public void DeactivateLearningGame(GameObject subject)
  295.     {
  296.         this.learningActive = false;
  297.         UnityEngine.Object.Destroy(subject);
  298.         this.LockMouse(); //Prevent the mouse from moving
  299.         if (this.player.stamina < 100f) //Reset Stamina
  300.         {
  301.             this.player.stamina = 100f;
  302.         }
  303.         if (!this.spoopMode) //If it isn't spoop mode, play the school music
  304.         {
  305.             this.schoolMusic.Play();
  306.             this.learnMusic.Stop();
  307.         }
  308.         if (this.notebooks == 1 & !this.spoopMode) // If this is the players first notebook and they didn't get any questions wrong, reward them with a quarter
  309.         {
  310.             this.quarter.SetActive(true);
  311.             this.tutorBaldi.PlayOneShot(this.aud_Prize);
  312.         }
  313.         else if (this.notebooks == 7 & this.mode == "story") // Plays the all 7 notebook sound
  314.         {
  315.             this.audioDevice.PlayOneShot(this.aud_AllNotebooks, 0.8f);
  316.         }
  317.     }
  318.  
  319.     // Token: 0x0600008E RID: 142 RVA: 0x00004BCC File Offset: 0x00002FCC
  320.     private void IncreaseItemSelection()
  321.     {
  322.         this.itemSelected++;
  323.         if (this.itemSelected > 4)
  324.         {
  325.             this.itemSelected = 0;
  326.         }
  327.         this.itemSelect.anchoredPosition = new Vector3((float)this.itemSelectOffset[this.itemSelected], -10f, -10f); //Moves the item selector background(the red rectangle)
  328.         this.UpdateItemName();
  329.     }
  330.  
  331.     // Token: 0x0600008F RID: 143 RVA: 0x00004C30 File Offset: 0x00003030
  332.     private void DecreaseItemSelection()
  333.     {
  334.         this.itemSelected--;
  335.         if (this.itemSelected < 0)
  336.         {
  337.             this.itemSelected = 4;
  338.         }
  339.         this.itemSelect.anchoredPosition = new Vector3((float)this.itemSelectOffset[this.itemSelected], -10f, -10f); //Moves the item selector background(the red rectangle)
  340.         this.UpdateItemName();
  341.     }
  342.  
  343.     // Token: 0x06000090 RID: 144 RVA: 0x00004C91 File Offset: 0x00003091
  344.     private void UpdateItemSelection()
  345.     {
  346.         this.itemSelect.anchoredPosition = new Vector3((float)this.itemSelectOffset[this.itemSelected], -10f, 10f); //Moves the item selector background(the red rectangle)
  347.         this.UpdateItemName();
  348.     }
  349.  
  350.     // Token: 0x06000091 RID: 145 RVA: 0x00004CC8 File Offset: 0x000030C8
  351.     public void CollectItem(int item_ID)
  352.     {
  353.         if (this.item[0] == 0)
  354.         {
  355.             this.item[0] = item_ID; //Set the item slot to the Item_ID provided
  356.             this.itemSlot[0].texture = this.itemTextures[item_ID]; //Set the item slot's texture to a texture in a list of textures based on the Item_ID
  357.         }
  358.         else if (this.item[1] == 0)
  359.         {
  360.             this.item[1] = item_ID; //Set the item slot to the Item_ID provided
  361.             this.itemSlot[1].texture = this.itemTextures[item_ID]; //Set the item slot's texture to a texture in a list of textures based on the Item_ID
  362.         }
  363.         else if (this.item[2] == 0)
  364.         {
  365.             this.item[2] = item_ID; //Set the item slot to the Item_ID provided
  366.             this.itemSlot[2].texture = this.itemTextures[item_ID]; //Set the item slot's texture to a texture in a list of textures based on the Item_ID
  367.         }
  368.         else //This one overwrites the currently selected slot when your inventory is full
  369.         {
  370.             this.item[this.itemSelected] = item_ID;
  371.             this.itemSlot[this.itemSelected].texture = this.itemTextures[item_ID];
  372.         }
  373.         this.UpdateItemName();
  374.     }
  375.  
  376.     // Token: 0x06000092 RID: 146 RVA: 0x00004D94 File Offset: 0x00003194
  377.     private void UseItem()
  378.     {
  379.         if (this.item[this.itemSelected] != 0) //If the item slot isn't empty
  380.         {
  381.             if (this.item[this.itemSelected] == 1)  //Zesty Bar Code
  382.             {
  383.                 this.player.stamina = this.player.maxStamina * 2f;
  384.                 this.ResetItem(); //Remove the item
  385.             }
  386.             else if (this.item[this.itemSelected] == 2) //Yellow Door Lock Code
  387.             {
  388.                 Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
  389.                 RaycastHit raycastHit;
  390.                 if (Physics.Raycast(ray, out raycastHit) && (raycastHit.collider.tag == "SwingingDoor" & Vector3.Distance(this.playerTransform.position, raycastHit.transform.position) <= 10f))
  391.                 {
  392.                     raycastHit.collider.gameObject.GetComponent<SwingingDoorScript>().LockDoor(15f); //Lock the door for 15 seconds
  393.                     this.ResetItem(); //Remove the item
  394.                 }
  395.             }
  396.             else if (this.item[this.itemSelected] == 3) //Principal's Keys Code
  397.             {
  398.                 Ray ray2 = Camera.main.ScreenPointToRay(Input.mousePosition);
  399.                 RaycastHit raycastHit2;
  400.                 if (Physics.Raycast(ray2, out raycastHit2) && (raycastHit2.collider.tag == "Door" & Vector3.Distance(this.playerTransform.position, raycastHit2.transform.position) <= 10f))
  401.                 {
  402.                     raycastHit2.collider.gameObject.GetComponent<DoorScript>().UnlockDoor(); //Unlock the door
  403.                     raycastHit2.collider.gameObject.GetComponent<DoorScript>().OpenDoor(); //Open the door
  404.                     this.ResetItem(); //Remove the item
  405.                 }
  406.             }
  407.             else if (this.item[this.itemSelected] == 4) //Bsoda Code
  408.             {
  409.                 UnityEngine.Object.Instantiate<GameObject>(this.bsodaSpray, this.playerTransform.position, this.cameraTransform.rotation); //Clone the BSODA Spray object
  410.                 this.ResetItem(); //Remove the item
  411.                 this.player.ResetGuilt("drink", 1f); // Makes the player guilty for drinking
  412.                 this.audioDevice.PlayOneShot(this.aud_Soda); // Play the spray sound
  413.             }
  414.             else if (this.item[this.itemSelected] == 5) //Quarter Code
  415.             {
  416.                 Ray ray3 = Camera.main.ScreenPointToRay(Input.mousePosition);
  417.                 RaycastHit raycastHit3;
  418.                 if (Physics.Raycast(ray3, out raycastHit3))
  419.                 {
  420.                     if (raycastHit3.collider.name == "BSODAMachine" & Vector3.Distance(this.playerTransform.position, raycastHit3.transform.position) <= 10f)
  421.                     {
  422.                         this.ResetItem(); //Remove the item
  423.                         this.CollectItem(4); //Give BSODA
  424.                     }
  425.                     else if (raycastHit3.collider.name == "ZestyMachine" & Vector3.Distance(this.playerTransform.position, raycastHit3.transform.position) <= 10f)
  426.                     {
  427.                         this.ResetItem(); //Remove the item
  428.                         this.CollectItem(1); //Give Zesty Bar
  429.                     }
  430.                     else if (raycastHit3.collider.name == "PayPhone" & Vector3.Distance(this.playerTransform.position, raycastHit3.transform.position) <= 10f)
  431.                     {
  432.                         raycastHit3.collider.gameObject.GetComponent<TapePlayerScript>().Play(); //Tell the phone to start making the noise
  433.                         this.ResetItem(); //Remove the item
  434.                     }
  435.                 }
  436.             }
  437.             else if (this.item[this.itemSelected] == 6) // Baldi Anti-hearing Code
  438.             {
  439.                 Ray ray4 = Camera.main.ScreenPointToRay(Input.mousePosition);
  440.                 RaycastHit raycastHit4;
  441.                 if (Physics.Raycast(ray4, out raycastHit4) && (raycastHit4.collider.name == "TapePlayer" & Vector3.Distance(this.playerTransform.position, raycastHit4.transform.position) <= 10f))
  442.                 {
  443.                     raycastHit4.collider.gameObject.GetComponent<TapePlayerScript>().Play(); //Tell the tape player to start making the noise
  444.                     this.ResetItem();
  445.                 }
  446.             }
  447.             else if (this.item[this.itemSelected] == 7) // Alarm Clock Code
  448.             {
  449.                 GameObject gameObject = UnityEngine.Object.Instantiate<GameObject>(this.alarmClock, this.playerTransform.position, this.cameraTransform.rotation); //Create a clone of the Alarm Clock
  450.                 gameObject.GetComponent<AlarmClockScript>().baldi = this.baldiScrpt; //Set the Alarm Clock's Baldi to the BaldiScript
  451.                 this.ResetItem(); //Remove the item
  452.             }
  453.             else if (this.item[this.itemSelected] == 8) // WD No Squee Code
  454.             {
  455.                 Ray ray5 = Camera.main.ScreenPointToRay(Input.mousePosition);
  456.                 RaycastHit raycastHit5;
  457.                 if (Physics.Raycast(ray5, out raycastHit5) && (raycastHit5.collider.tag == "Door" & Vector3.Distance(this.playerTransform.position, raycastHit5.transform.position) <= 10f))
  458.                 {
  459.                     raycastHit5.collider.gameObject.GetComponent<DoorScript>().SilenceDoor(); // Silences the door
  460.                     this.ResetItem(); //Remove the item
  461.                     this.audioDevice.PlayOneShot(this.aud_Spray); //Plays the spray sound
  462.                 }
  463.             }
  464.             else if (this.item[this.itemSelected] == 9) // Safety Scissors Code
  465.             {
  466.                 Ray ray6 = Camera.main.ScreenPointToRay(Input.mousePosition);
  467.                 RaycastHit raycastHit6;
  468.                 if (this.player.jumpRope)
  469.                 {
  470.                     this.player.DeactivateJumpRope();
  471.                     this.playtimeScript.Disappoint();
  472.                     this.ResetItem();
  473.                 }
  474.                 else if (Physics.Raycast(ray6, out raycastHit6) && raycastHit6.collider.name == "1st Prize")
  475.                 {
  476.                     this.firstPrizeScript.GoCrazy();
  477.                     this.ResetItem();
  478.                 }
  479.             }
  480.         }
  481.     }
  482.  
  483.     // Token: 0x06000093 RID: 147 RVA: 0x000052F4 File Offset: 0x000036F4
  484.     private void ResetItem()
  485.     {
  486.         this.item[this.itemSelected] = 0; //Resets the current item slot
  487.         this.itemSlot[this.itemSelected].texture = this.itemTextures[0]; //Resets the current item slot texture
  488.         this.UpdateItemName();
  489.     }
  490.  
  491.     // Token: 0x06000094 RID: 148 RVA: 0x00005324 File Offset: 0x00003724
  492.     public void LoseItem(int id)
  493.     {
  494.         this.item[id] = 0; //Resets the item slot
  495.         this.itemSlot[id].texture = this.itemTextures[0]; //Resets the item slot texture
  496.         this.UpdateItemName();
  497.     }
  498.  
  499.     // Token: 0x06000095 RID: 149 RVA: 0x0000534A File Offset: 0x0000374A
  500.     private void UpdateItemName()
  501.     {
  502.         this.itemText.text = this.itemNames[this.item[this.itemSelected]];
  503.     }
  504.  
  505.     // Token: 0x06000096 RID: 150 RVA: 0x0000536C File Offset: 0x0000376C
  506.     public void ExitReached()
  507.     {
  508.         this.exitsReached++;
  509.         if (this.exitsReached == 1)
  510.         {
  511.             RenderSettings.ambientLight = Color.red; //Make everything red and start player the weird sound
  512.             RenderSettings.fog = true;
  513.             this.audioDevice.PlayOneShot(this.aud_Switch, 0.8f);
  514.             this.audioDevice.clip = this.aud_MachineQuiet;
  515.             this.audioDevice.loop = true;
  516.             this.audioDevice.Play();
  517.         }
  518.         if (this.exitsReached == 2) //Play a sound
  519.         {
  520.             this.audioDevice.volume = 0.8f;
  521.             this.audioDevice.clip = this.aud_MachineStart;
  522.             this.audioDevice.loop = true;
  523.             this.audioDevice.Play();
  524.         }
  525.         if (this.exitsReached == 3) //Play a even louder sound
  526.         {
  527.             this.audioDevice.clip = this.aud_MachineRev;
  528.             this.audioDevice.loop = false;
  529.             this.audioDevice.Play();
  530.         }
  531.     }
  532.  
  533.     // Token: 0x06000097 RID: 151 RVA: 0x00005459 File Offset: 0x00003859
  534.     public void DespawnCrafters()
  535.     {
  536.         this.crafters.SetActive(false); //Make Arts And Crafters Inactive
  537.     }
  538.  
  539.     public GameObject char1;
  540.  
  541.     public GameObject char2;
  542.  
  543.     public GameObject char3;
  544.  
  545.     // Token: 0x040000AB RID: 171
  546.     public CursorControllerScript cursorController;
  547.  
  548.     // Token: 0x040000AC RID: 172
  549.     public PlayerScript player;
  550.  
  551.     // Token: 0x040000AD RID: 173
  552.     public Transform playerTransform;
  553.  
  554.     // Token: 0x040000AE RID: 174
  555.     public Transform cameraTransform;
  556.  
  557.     // Token: 0x040000AF RID: 175
  558.     public EntranceScript entrance_0;
  559.  
  560.     // Token: 0x040000B0 RID: 176
  561.     public EntranceScript entrance_1;
  562.  
  563.     // Token: 0x040000B1 RID: 177
  564.     public EntranceScript entrance_2;
  565.  
  566.     // Token: 0x040000B2 RID: 178
  567.     public EntranceScript entrance_3;
  568.  
  569.     // Token: 0x040000B3 RID: 179
  570.     public GameObject baldiTutor;
  571.  
  572.     // Token: 0x040000B4 RID: 180
  573.     public GameObject baldi;
  574.  
  575.     // Token: 0x040000B5 RID: 181
  576.     public BaldiScript baldiScrpt;
  577.  
  578.     // Token: 0x040000B6 RID: 182
  579.     public AudioClip aud_Prize;
  580.  
  581.     // Token: 0x040000B7 RID: 183
  582.     public AudioClip aud_AllNotebooks;
  583.  
  584.     // Token: 0x040000B8 RID: 184
  585.     public GameObject principal;
  586.  
  587.     // Token: 0x040000B9 RID: 185
  588.     public GameObject crafters;
  589.  
  590.     // Token: 0x040000BA RID: 186
  591.     public GameObject playtime;
  592.  
  593.     // Token: 0x040000BB RID: 187
  594.     public PlaytimeScript playtimeScript;
  595.  
  596.     // Token: 0x040000BC RID: 188
  597.     public GameObject gottaSweep;
  598.  
  599.     // Token: 0x040000BD RID: 189
  600.     public GameObject bully;
  601.  
  602.     // Token: 0x040000BE RID: 190
  603.     public GameObject firstPrize;
  604.  
  605.     // Token: 0x040000BF RID: 191
  606.     public FirstPrizeScript firstPrizeScript;
  607.  
  608.     // Token: 0x040000C0 RID: 192
  609.     public GameObject quarter;
  610.  
  611.     // Token: 0x040000C1 RID: 193
  612.     public AudioSource tutorBaldi;
  613.  
  614.     // Token: 0x040000C2 RID: 194
  615.     public string mode;
  616.  
  617.     // Token: 0x040000C3 RID: 195
  618.     public int notebooks;
  619.  
  620.     // Token: 0x040000C4 RID: 196
  621.     public GameObject[] notebookPickups;
  622.  
  623.     // Token: 0x040000C5 RID: 197
  624.     public int failedNotebooks;
  625.  
  626.     // Token: 0x040000C6 RID: 198
  627.     public float time;
  628.  
  629.     // Token: 0x040000C7 RID: 199
  630.     public bool spoopMode;
  631.  
  632.     // Token: 0x040000C8 RID: 200
  633.     public bool finaleMode;
  634.  
  635.     // Token: 0x040000C9 RID: 201
  636.     public bool debugMode;
  637.  
  638.     // Token: 0x040000CA RID: 202
  639.     public bool mouseLocked;
  640.  
  641.     // Token: 0x040000CB RID: 203
  642.     public int exitsReached;
  643.  
  644.     // Token: 0x040000CC RID: 204
  645.     public int itemSelected;
  646.  
  647.     // Token: 0x040000CD RID: 205
  648.     public int[] item = new int[5];
  649.  
  650.     // Token: 0x040000CE RID: 206
  651.     public RawImage[] itemSlot = new RawImage[5];
  652.  
  653.     // Token: 0x040000CF RID: 207
  654.     private string[] itemNames = new string[]
  655.     {
  656.         "Nothing",
  657.         "Energy flavored Zesty Bar",
  658.         "Yellow Door Lock",
  659.         "Principal's Keys",
  660.         "BSODA",
  661.         "Quarter",
  662.         "Baldi Anti Hearing and Disorienting Tape",
  663.         "Alarm Clock",
  664.         "WD-NoSquee (Door Type)",
  665.         "Safety Scissors"
  666.     };
  667.  
  668.     // Token: 0x040000D0 RID: 208
  669.     public Text itemText;
  670.  
  671.     // Token: 0x040000D1 RID: 209
  672.     public UnityEngine.Object[] items = new UnityEngine.Object[10];
  673.  
  674.     // Token: 0x040000D2 RID: 210
  675.     public Texture[] itemTextures = new Texture[10];
  676.  
  677.     // Token: 0x040000D3 RID: 211
  678.     public GameObject bsodaSpray;
  679.  
  680.     // Token: 0x040000D4 RID: 212
  681.     public GameObject alarmClock;
  682.  
  683.     // Token: 0x040000D5 RID: 213
  684.     public Text notebookCount;
  685.  
  686.     // Token: 0x040000D6 RID: 214
  687.     public GameObject pauseText;
  688.  
  689.     // Token: 0x040000D7 RID: 215
  690.     public GameObject highScoreText;
  691.  
  692.     // Token: 0x040000D8 RID: 216
  693.     public GameObject baldiNod;
  694.  
  695.     // Token: 0x040000D9 RID: 217
  696.     public GameObject baldiShake;
  697.  
  698.     // Token: 0x040000DA RID: 218
  699.     public GameObject warning;
  700.  
  701.     // Token: 0x040000DB RID: 219
  702.     public GameObject reticle;
  703.  
  704.     // Token: 0x040000DC RID: 220
  705.     public RectTransform itemSelect;
  706.  
  707.     // Token: 0x040000DD RID: 221
  708.     private int[] itemSelectOffset;
  709.  
  710.     // Token: 0x040000DE RID: 222
  711.     private bool gamePaused;
  712.  
  713.     // Token: 0x040000DF RID: 223
  714.     private bool learningActive;
  715.  
  716.     // Token: 0x040000E0 RID: 224
  717.     private float gameOverDelay;
  718.  
  719.     // Token: 0x040000E1 RID: 225
  720.     private AudioSource audioDevice;
  721.  
  722.     // Token: 0x040000E2 RID: 226
  723.     public AudioClip aud_Soda;
  724.  
  725.     // Token: 0x040000E3 RID: 227
  726.     public AudioClip aud_Spray;
  727.  
  728.     // Token: 0x040000E4 RID: 228
  729.     public AudioClip aud_buzz;
  730.  
  731.     // Token: 0x040000E5 RID: 229
  732.     public AudioClip aud_Hang;
  733.  
  734.     // Token: 0x040000E6 RID: 230
  735.     public AudioClip aud_MachineQuiet;
  736.  
  737.     // Token: 0x040000E7 RID: 231
  738.     public AudioClip aud_MachineStart;
  739.  
  740.     // Token: 0x040000E8 RID: 232
  741.     public AudioClip aud_MachineRev;
  742.  
  743.     // Token: 0x040000E9 RID: 233
  744.     public AudioClip aud_MachineLoop;
  745.  
  746.     // Token: 0x040000EA RID: 234
  747.     public AudioClip aud_Switch;
  748.  
  749.     // Token: 0x040000EB RID: 235
  750.     public AudioSource schoolMusic;
  751.  
  752.     // Token: 0x040000EC RID: 236
  753.     public AudioSource learnMusic;
  754. }
Advertisement
Add Comment
Please, Sign In to add comment