Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
    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);
    }
Ejemplo n.º 3
0
    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);
    }