Esempio n. 1
0
    public void ActivateItemCanvas(GameObject toShowcase, ItemData data)
    {
        inMenu = true;
        showcaseCamera.SetActive(true);
        examineItemCanvas.SetActive(true);
        rateButton.SetActive(false);
        lastObjectChecked = toShowcase;
        if (!GameManager.Instance.murderMode && data.rambling != null && data.rambling.Length > 0)
        {
            RamblingText rt = examineItemCanvas.GetComponentInChildren <RamblingText>(true);
            rt.currentRambling = data.rambling;
            rtGO.SetActive(true);
        }

        TeleportBehindYou tp = toShowcase.GetComponent <TeleportBehindYou>();

        if (tp != null)
        {
            tp.canTeleport = true;
        }

        if (!GameManager.Instance.murderMode)
        {
            ValueHandler.Instance.PreviewValue(data.values);
        }
        showcase.SetNewShowcase(toShowcase, data);
    }
Esempio n. 2
0
    void Start()
    {
        RamblingText rt = examineItemCanvas.GetComponentInChildren <RamblingText>(true);

        rtGO = rt.gameObject;
        //activeMenus = new Dictionary<string, bool>();
        //foreach (GameObject child in GetComponentsInChildren<GameObject>())
        //{
        //    if (child.transform.parent != null)
        //    {
        //        activeMenus.Add(child.name, child.activeInHierarchy);
        //    }
        //}
    }