示例#1
0
    public override void Draw(Transform trans)
    {
        textName.text = name;
        foreach (Transform transform in trans)
        {
            GeneralEvent generalEvent = transform.GetComponent <GeneralEvent>();
            if (generalEvent == null)
            {
                EditorAction eItem = (EditorBaseItem.CreatEditorChangeItem(transform.gameObject, actionPrefab, this.transform, transform.name) as EditorAction);

                Action action = transform.GetComponent <Action>();
                if (action != null)
                {
                    eItem.textName.text = action.text;
                    if (action.GetFirstComponentInChildren <Outcome>() != null)
                    {
                        eItem.SetStartColor(Color.green);
                        RandomEventController randomEvent = transform.GetComponent <RandomEventController>();
                        eItem.arrow_out.gameObject.SetActive(randomEvent != null && randomEvent.Count > 0);
                    }
                }
                else
                {
                    eItem.SetStartColor(Color.green);
                    eItem.arrow_out.gameObject.SetActive(false);
                }
            }
        }
    }
示例#2
0
    public virtual void Draw(Transform trans)
    {
        DestroyContent();

        foreach (Transform transform in trans)
        {
            EditorBaseItem.CreatEditorChangeItem(transform.gameObject, actionPrefab, content.transform, transform.name).GetComponent <EditorEventExecuter>().eventName = "OnClick_" + name;
            countItems++;
        }
    }
示例#3
0
 public virtual void Draw(List <Outcome> outcomList)
 {
     if (outcomList.Count > 0)
     {
         Instantiate(textOutcomsPrefab, content, false);
     }
     foreach (Outcome outcome in outcomList)
     {
         EditorBaseItem.CreatEditorChangeItem(outcome.gameObject, actionPrefab, content, outcome.name + "   " + outcome.base_chance + "%");
     }
 }
示例#4
0
 public virtual void Draw(List <GeneralEvent> randomEventList)
 {
     if (randomEventList.Count > 0)
     {
         Instantiate(textEventsPrefab, content, false);
     }
     foreach (GeneralEvent generalEvent in randomEventList)
     {
         EditorBaseItem.CreatEditorChangeItem(generalEvent.gameObject, actionPrefab, content, generalEvent.name + "   " + generalEvent.base_chance + "%");
     }
 }
示例#5
0
 public override void Draw(Transform trans)
 {
     //print(currentEditorBaseItem + "  ---Draw----  " + name);
     DestroyContent();
     foreach (Transform transform in trans)
     {
         Action action = transform.GetComponent <Action>();
         if (action != null)
         {
             EditorBaseItem.CreatEditorChangeItem(transform.gameObject, actionPrefab, content.transform, action.text).GetComponent <EditorEventExecuter>().eventName = "OnClick_" + name;
             countItems++;
         }
     }
 }