Example #1
0
 public ASColor()
 {
     //list of builtin functions
     _builtinFunctions = new Dictionary <string, Action <ObjectContext, Value[]> >
     {
         ["setRGB"] = (ObjectContext ctx, Value[] args) => { _color = ColorRgba.FromHex(_color, args.First().ToString()); }
     };
 }
Example #2
0
 public Color()
 {
     //list of builtin functions
     _builtinFunctions           = new Dictionary <string, Action <ObjectContext, Value[]> >();
     _builtinFunctions["setRGB"] = (ObjectContext ctx, Value[] args) => { _color.FromHex(args.First().ToString()); };
 }
Example #3
0
 private Value setRGB(Value[] args)
 {
     _color = ColorRgba.FromHex(_color, args.First().ToString());
     return(Value.Undefined());
 }