Example #1
0
    public void DrawLine()
    {
        if (linesEventPanel.ContainsKey(this))
        {
            linesStep.Remove(linesEventPanel[this]);
            linesEventPanel.Remove(this);
        }

        foreach (EditorAction eItem in this.GetChildrenComponents <EditorAction>())
        {
            RandomEventController randomEvent = eItem.storyTransform.GetComponent <RandomEventController>();
            if (randomEvent != null)
            {
                for (uint i = 0; i < randomEvent.Count; i++)
                {
                    DrawLineEvent(eItem, randomEvent.GetEvent(i), i > 0);
                }
            }
            else
            {
                ActionMGController actionMGController = eItem.storyTransform.GetComponent <ActionMGController>();
                if (actionMGController != null)
                {
                    DrawLineEvent(eItem, actionMGController.MgComplite);
                    DrawLineEvent(eItem, actionMGController.MgNotComplite, true);
                }
            }
        }
    }
Example #2
0
    void DrawChanceGeneralEvent()
    {
        RandomEventController randomEventController = action.GetComponent <RandomEventController>();
        GeneralEvent          revent = (randomEventController != null) ? randomEventController.GetEvent(0) : null;

        if (revent != null && randomEventController.Count == 1)
        {
            float chance = 0f;
            statImage.sprite = revent.GetIcon(ref chance);
            if (statImage.sprite != null)
            {
                DrawChance(chance);
            }
        }
    }