Example #1
0
        public Dialogue(Yarn.VariableStorage continuity)
        {
            this.continuity = continuity;
            loader = new Loader (this);
            library = new Library ();

            library.ImportLibrary (new StandardLibrary ());

            // Register the "visited" function, which returns true if we've visited
            // a node previously (nodes are marked as visited when we leave them)
            library.RegisterFunction ("visited", 1, delegate(Yarn.Value[] parameters) {
                var name = parameters[0].AsString;
                return visitedNodeNames.Contains(name);
            });
        }