Ejemplo n.º 1
0
    public bool execute()
    {
        bool             forcewait = false;
        ConversationLine l;

        if (node != null)
        {
            switch (node.getType())
            {
            case ConversationNodeViewEnum.DIALOGUE:
                while (current_line < node.getLineCount() && !forcewait)
                {
                    l = node.getLine(current_line);
                    if (ConditionChecker.check(l.getConditions()))
                    {
                        forcewait = true;
                        Game.Instance.talk(l.getText(), l.getName());
                    }
                    current_line++;
                }
                if (!forcewait && additional_effects != null && additional_effects.effects.Count > 0)
                {
                    forcewait = additional_effects.execute();
                }

                break;

            case ConversationNodeViewEnum.OPTION:
                if (this.child == -2)
                {
                    Game.Instance.showOptions(this);
                    forcewait = true;
                }
                else
                {
                    if (additional_effects != null)
                    {
                        forcewait = additional_effects.execute();
                    }
                    else
                    {
                        forcewait = false;
                    }
                }
                break;
            }
        }

        return(forcewait);
    }
        public bool execute()
        {
            if (effectHolder != null)
            {
                force_wait = effectHolder.execute();
                if (!force_wait)
                {
                    finished = true;
                }
            }

            return(force_wait);
        }
Ejemplo n.º 3
0
        public bool execute()
        {
            if (effectHolder != null)
            {
                force_wait = effectHolder.execute();
                if (!force_wait)
                {
                    finished = true;
                }
                //DestroyImmediate(this.gameObject);
            }

            return(force_wait);
        }