bool removal = false; //Bool for item removal //Initialises the references to scripts and components, and updates the quest details// void Start() { playerStats = player.GetComponent <PlayerStats>(); playerScript = player.GetComponent <playerController>(); playerInventory = player.GetComponent <Inventory>(); deathLog = player.GetComponent <DeathLog>(); anim = NPC.GetComponent <Animation>(); GetQuestDetails(); }
MenuControl menuControl; //Reference to the player menu control //This method is called at the start// public void Start() { //Set up the reference to the quest script questScript = NPC.GetComponent <Quest>(); //Set up the text component text1 = objText1.GetComponent <Text>(); text2 = objText2.GetComponent <Text>(); text3 = objText3.GetComponent <Text>(); text4 = objText4.GetComponent <Text>(); text5 = objText5.GetComponent <Text>(); //Set up the player script references playerInventory = player.GetComponent <Inventory>(); playerScript = player.GetComponent <playerController>(); deathLog = player.GetComponent <DeathLog>(); menuControl = player.GetComponent <MenuControl>(); }