// Use this for initialization void Start() { this.chest = transform.Find("Chest").gameObject; this.info = transform.Find("Info").gameObject; this.manager = GameObject.Find("Manager").GetComponent<PhiManager>(); this.name_text = transform.Find("Name").GetComponent<Text>(); this.price_text = transform.Find("Price").Find("Text").GetComponent<Text>(); this.name_text.text = "Coffre"; this.price_text.text = "30 000"; this.animator = transform.Find("Chest").Find("Groupe").GetComponent<Animator>(); this.buy = transform.Find("Buy").GetComponent<Button>(); this.buy.onClick.AddListener(delegate () { OnBuy(); }); }
// Use this for initialization void Start() { if (this.player == null) return; this.stats_panel = transform.Find("Stats").gameObject; this.name_text = transform.Find("Name").GetComponent<Text>(); this.price_text = transform.Find("Price").Find("Text").GetComponent<Text>(); this.name_text.text = this.player.Name; this.price_text.text = this.player.Price.ToString(); this.manager = GameObject.Find("Manager").GetComponent<PhiManager>(); InstantiateSwungMan(); SetUpStats(); this.buy = transform.Find("Buy").GetComponent<Button>(); this.buy.onClick.AddListener(delegate () { OnBuy(); }); if (Settings.Instance.Default_player.ContainsKey(this.player.UID)) BoughtButton(); }