示例#1
0
    public void OnClick()
    {
        if (finished)
        {
            return;
        }
        //GameStatus.Instance.UntilGoto();
        //GameStatus.Instance.GotoMeta(gotoName);
        PlayerItem currentItem = GameStatus.Instance.PlayerOwningItems.GetPlayerItem(gameObject.name);

        if (currentItem != null)
        {
            GameStatus.Instance.SetDialogSentence(
                "This is my " +
                currentItem.GetAttr("Dialog 01 Name") + "," +
                currentItem.GetAttr("Dialog 02 Space") + "." +
                currentItem.GetAttr("Dialog 03 Newness") + ", and I think " +
                currentItem.GetAttr("Dialog 04 Necessity") + "." +
                currentItem.GetAttr("Dialog 05 Likability") + ".\n");
        }
        PersonalEventManager.TriggerEvent("RefreshGameStatusUI");
        transform.SetAsLastSibling();
        transform.Find("OperationPanel").gameObject.SetActive(true);
        transform.FindDeepChild("Status").GetComponentInChildren <Text>().text =
            "";
        //"a: " + a + "\nb: " + b + "\nc: " + c + "\nd: " + d;
    }
示例#2
0
    public void Drop()
    {
        PlayerItem currentItem = GameStatus.Instance.PlayerOwningItems.GetPlayerItem(gameObject.name);

        if (currentItem != null)
        {
            GameStatus.Instance.Stress       += int.Parse(currentItem.GetAttr("Throw Stress"));
            GameStatus.Instance.Living       += int.Parse(currentItem.GetAttr("Throw Living"));
            GameStatus.Instance.Satisfaction += int.Parse(currentItem.GetAttr("Throw Satisfaction"));

            GameStatus.Instance.SetDialogSentence(
                "I feel " +
                currentItem.GetAttr("Dialog 09 Throw Stress") + ". I think my room becomes " +
                currentItem.GetAttr("Dialog 10 Throw Living") + "." +
                currentItem.GetAttr("Dialog 11 Throw Satisfaction") + ".\n");
            PersonalEventManager.TriggerEvent("RefreshGameStatusUI");

            PersonalEventManager.TriggerEvent("RefreshGameStatusUI");
            GameStatus.Instance.PlayerOwningItems.Remove(gameObject.name.ToLower());
            gameObject.SetActive(false);
        }
    }
示例#3
0
    public void Organize()
    {
        PlayerItem currentItem = GameStatus.Instance.PlayerOwningItems.GetPlayerItem(gameObject.name);

        if (currentItem != null)
        {
            GameStatus.Instance.Stress       += int.Parse(currentItem.GetAttr("Organize Stress"));
            GameStatus.Instance.Living       += int.Parse(currentItem.GetAttr("Organize Living"));
            GameStatus.Instance.Satisfaction += int.Parse(currentItem.GetAttr("Organize Satisfaction"));

            GameStatus.Instance.SetDialogSentence(
                "I feel " +
                currentItem.GetAttr("Dialog 06 Organize Stress") + ". I think my room becomes " +
                currentItem.GetAttr("Dialog 07 Organize Living") + "." +
                currentItem.GetAttr("Dialog 08 Organize Satisfaction") + ".\n");
            PersonalEventManager.TriggerEvent("RefreshGameStatusUI");
            finished           = true;
            transform.position = transform.FindDeepChild("OrganizedPoint").transform.position;
            CancelShow();
            transform.parent = transform.parent.parent.GetComponent <themePanel>().AfterOrganziedPanel.transform;
            setIndexForOrganizedPanel();
        }
    }