예제 #1
0
 internal FunctionInfo(string name, int paramCount, ReturningFunction implementation)
 {
     this.name              = name;
     this.paramCount        = paramCount;
     this.returningFunction = implementation;
     this.function          = null;
 }
예제 #2
0
        // Expose the RegisterFunction methods from dialogue.library to Unity

        /// Registers a new function that returns a value, so that it can
        /// be called from Yarn scripts.
        public void RegisterFunction(string name, int parameterCount, ReturningFunction implementation)
        {
            dialogue.library.RegisterFunction(name, parameterCount, implementation);
        }
예제 #3
0
        public void RegisterFunction(string name, int parameterCount, ReturningFunction implementation)
        {
            var info = new FunctionInfo(name, parameterCount, implementation);

            RegisterFunction(info);
        }
예제 #4
0
 private void AddFunction(Dialogue dialogue, string name, int parameterCount, ReturningFunction implementation)
 => dialogue.library.RegisterFunction(name, parameterCount, implementation);