Ejemplo n.º 1
0
    public void Touched(bool state)
    {
        if (state && bag.isOpen)
        {
            if (SuppliesManager.instance.counts[typeIndex] > 0)
            {
                UI.ShowInstrument(operableInstrumentPrefab);
            }
            else
            {
                UI.ShowInstrument(UI.goneText);
            }
        }

        GetComponent <SelectionHighlight>().Highlight(state);
        //bag.ResetTimeout();

        //if (SuppliesManager.instance.counts[(int)type] > 0)
        //{
        //    GameObject instrument = Instantiate(operableInstrumentPrefab, transform.position, transform.rotation) as GameObject;
        //    SuppliesManager.instance.counts[(int)type]--;
        //    if (SuppliesManager.instance.counts[(int)type] <= 0)
        //    {
        //        noneLeft = true;
        //    }
        //    instrument.GetComponent<instrumentSelection>().StartCoroutine(CalculateDist(instrument.transform));
        //    //SuppliesManager.instance.SetText();
        //    gameObject.SetActive(false);
        //}
        //else
        //{
        //    print("out of that instrument");
        //    //SuppliesManager.instance.texts[typeIndexer].text = "None Remaining";
        //}
    }
Ejemplo n.º 2
0
 public void Returned()
 {
     //print("destroying");
     SuppliesManager.instance.counts[(int)type]++;
     UI.ShowInstrument(selfPrefab);
     Destroy(gameObject);
 }