public void initStats(Toy toy) { my_toy = toy; if (!showProgress()) { return; } GameObject buttons = Peripheral.Instance.zoo.getObject("GUI/construction_indicator", false); construction_indicator = buttons.GetComponent <Mini_Toy_Button_Driver>(); construction_indicator.InitMiniDriver(this); buttons.SetActive(true); }
public void InitAmmoPanel() { if (toy.toy_type != ToyType.Temporary) { return; } if (ammo_panel == null) { GameObject buttons = Peripheral.Instance.zoo.getObject("GUI/ammo_panel", false); // Debug.Log($"Initializing ammo panel for ${this.gameObject.name} ${buttons.GetInstanceID()}\n"); ammo_panel = buttons.GetComponent <Mini_Toy_Button_Driver>(); } ammo_panel.gameObject.SetActive(true); ammo_panel.InitMiniDriver(this.toy); }
public void InitRuneButtons() { if (rune_buttons != null) { rune_buttons.gameObject.SetActive(true); rune_buttons.InitMiniDriver(this); return; } GameObject buttons = Peripheral.Instance.zoo.getObject("GUI/rune_buttons", false); rune_buttons = buttons.GetComponent <Mini_Toy_Button_Driver>(); buttons.transform.SetParent(this.transform); buttons.transform.localPosition = Vector3.zero; buttons.SetActive(true); rune_buttons.InitMiniDriver(this); }