private void Start() { playing = false; iManager = FindObjectOfType <InterfaceManager>(); uiScore = GameObject.Find("GuitarGodScore").GetComponent <Text>(); uiMultiplier = GameObject.Find("GGMultiplier").GetComponent <Text>(); random = new System.Random(); missClick = GameObject.Find("Missclick").GetComponent <Button>(); missClick.onClick.AddListener(() => MissClicked()); rockmeters = Resources.LoadAll <Sprite>("rockmeter"); rockmeterImage = GameObject.Find("GGRockMeter").GetComponent <Image>(); guitarnotes = new List <GameObject>() { (GameObject)Resources.Load("Note1", typeof(GameObject)), (GameObject)Resources.Load("Note2", typeof(GameObject)), (GameObject)Resources.Load("Note3", typeof(GameObject)), }; guitargod = GameObject.Find("GuitarGod"); StartCoroutine(gameTimer()); }
private void Start() { random = new System.Random(); playerHP = 0; npcHP = 0; cutscene = FindObjectOfType <Cutscene>(); iManager = FindObjectOfType <InterfaceManager>(); barfight = GameObject.Find("BarFight"); bfInsults = new List <Text> { GameObject.Find("BFtextNPC").GetComponent <Text>(), GameObject.Find("BFtextPlayer").GetComponent <Text>() }; bfInfo = GameObject.Find("BFinfo"); bfInfoText = bfInfo.GetComponent <Text>(); bfInfo.SetActive(false); bfPlayer = new List <Image>() { GameObject.Find("BFPlayer").GetComponent <Image>(), GameObject.Find("HPplayer").GetComponent <Image>(), }; bfNPC = new List <Image>() { GameObject.Find("BFNPC").GetComponent <Image>(), GameObject.Find("HPnpc").GetComponent <Image>() }; insults = new List <string>() { "Hey donkey, how is your mother? Do the zoo keepers remember to feed her?", "You stupidhead, how does it feel to be stupid?", "I had a lovely evening with your mother yesterday. Or was it a cow? Can't remember.", "I'm sorry your dad beat you instead of cancer.", "If you were a potato you'd be a stupid potato.", "You are so ugly that when you were born, the doctor slapped your mother.", "Ready to fail like your dad's condom?", "You look like something I drew with my left hand.", }; playerHPBar = Resources.LoadAll <Sprite>("HPplayer"); npcHPBar = Resources.LoadAll <Sprite>("HPnpc"); bfPlayer[1].sprite = playerHPBar[0]; bfNPC[1].sprite = npcHPBar[0]; bfOptionsPanel = GameObject.Find("BFoptions"); bfDialogue = new List <GameObject> { GameObject.Find("BFdialogueNPC"), GameObject.Find("BFdialoguePlayer") }; bfDialogue[0].SetActive(false); bfDialogue[1].SetActive(false); bfOptions = new List <Button>() { GameObject.Find("BFAttack").GetComponent <Button>(), GameObject.Find("BFInsult").GetComponent <Button>(), GameObject.Find("BFDrink").GetComponent <Button>(), }; buttonToString = new Dictionary <Button, string>() { { bfOptions[0], "Attack" }, { bfOptions[1], "Insult" }, { bfOptions[2], "Drink" }, }; foreach (Button button in bfOptions) { button.onClick.AddListener(() => attackOptions(button)); } barfight.SetActive(false); }