Esempio n. 1
0
    public override void defaultOnStarted(string path = "")
    {
        logger.LogFormat(LogType.Log, "{0} ({1}) onStarted '{2}'", LogTag, this.path, path);
        if (!string.IsNullOrEmpty(path) && !CheckPathExists(path))
        {
            throw new ApplicationException(string.Format("{0} ({1}) path '{2}' nay", LogTag, this.path, path));
        }
        base.defaultOnStarted(path);

        string[] names = string.IsNullOrEmpty(path) ? new string[] { startStateName } : path.Split('/');

        DialogBase db = states[names[0]];

        _curStateName = db.name;
        if (names.Length == 1)
        {
            db.OnStarted();
        }
        else if (db is DialogSet)
        {
            ((DialogSet)db).OnStarted(path.Substring(names[0].Length + 1));
        }
    }