void OnEnable() { audioSource = GetComponent <AudioSource>(); audioSource.PlayOneShot(menuAppear); mgr = FindObjectOfType <CustomisationManager>(); NewItem currPurchaseItem = mgr.features[mgr.currFeature].ReturnItem(); itemNameText.text = currPurchaseItem.GetName() + " for " + currPurchaseItem.GetCost() + " orbs?"; }
private void Start() { gManager = SingletonHelper.Find(SingletonEnums.GameManager).GetComponent <GameManager>(); cManager = SingletonHelper.Find(SingletonEnums.CustomisationManager).GetComponent <CustomisationManager>(); var winnerID = gManager.QueryStats(GetWinningOrder).First(); if (winnerID < gManager.GameData.HumanCount) { DragonHelper.SetDragonAsPlayer(cManager.GetPlayerCustomisation(winnerID), dragon); } UpdateDisplay(winnerID, gManager.GetPlayerStatsData(winnerID)); }
// Use this for initialization void Start() { mgr = FindObjectOfType <CustomisationManager> (); audioSource = GetComponent <AudioSource>(); anim = GetComponent <Animator>(); if (PlayerPrefs.GetString("GENDER").Equals("M")) { genderToggle.value = 0; } else { genderToggle.value = 1; } genderToggle.onValueChanged.AddListener(delegate { mgr.ToggleGender(Mathf.RoundToInt(genderToggle.value)); }); InitialiseButtons(); UpdateText(); UpdateSelectButton(); }