GetValues() 공개 메소드

public GetValues ( ) : List
리턴 List
예제 #1
0
 public override Value Invoke( List Arguments )
 {
     var list = Arguments.GetValues();
     if ( list[ 0 ] is Function ) onLoad = list[ 0 ] as Function;
     if ( list[ 1 ] is Function ) onUpdate = list[ 1 ] as Function;
     Firefly.Initialize( 800, 500, "Firefly Window", LoadEventInterface, true );
     return this;
 }
예제 #2
0
파일: Array.cs 프로젝트: LukaHorvat/Kento
 public Value Min(List Arguments)
 {
     if (Arguments.GetValues().All(X => X is Number))
     {
         return(Arguments.Arr.Min());
     }
     throw new Exception("Min function can only be used on arrays containing only numbers");
 }
예제 #3
0
 public Value Output(List Arguments)
 {
     foreach (var val in Arguments.GetValues())
     {
         Console.Write(val);
     }
     Console.WriteLine();
     return(NoValue.Value);
 }
예제 #4
0
 public Value Output( List Arguments )
 {
     foreach ( var val in Arguments.GetValues() )
     {
         Console.Write( val );
     }
     Console.WriteLine();
     return NoValue.Value;
 }
예제 #5
0
        public override Value Invoke( List Arguments )
        {
            var list = Arguments.GetValues();
            if ( list[ 0 ] is Boolean )
            {
                var temp = new List<float>();
                for ( int i = 1 ; i < list.Count ; ++i )
                {
                    if ( list[ i ] is Number ) temp.Add( (float)( (Number)list[ i ] ).Val );
                }
                Polygon = new Polygon( ( (Boolean)list[ 0 ] ).Val, temp.ToArray() );
            } else throw new Exception( "First argument of the polygon constructor must be a boolean" );

            return this;
        }
예제 #6
0
        public override Value Invoke(List Arguments)
        {
            var list = Arguments.GetValues();

            if (list[0] is Function)
            {
                onLoad = list[0] as Function;
            }
            if (list[1] is Function)
            {
                onUpdate = list[1] as Function;
            }
            Firefly.Initialize(800, 500, "Firefly Window", LoadEventInterface, true);
            return(this);
        }
예제 #7
0
 public override Value Invoke(List Arguments)
 {
     if (Arguments.Arr.Count == 3)
     {
         var   list = Arguments.GetValues();
         Value first = list[0], second = list[1], third = list[2];
         if (first is Number && second is Number && third is Number)
         {
             red   = first as Number;
             green = second as Number;
             blue  = third as Number;
             return(this);
         }
     }
     throw new Exception("Color constructor takes 3 numbers");
 }
예제 #8
0
파일: SLColor.cs 프로젝트: LukaHorvat/Kento
 public override Value Invoke( List Arguments )
 {
     if ( Arguments.Arr.Count == 3 )
     {
         var list = Arguments.GetValues();
         Value first = list[ 0 ], second = list[ 1 ], third = list[ 2 ];
         if ( first is Number && second is Number && third is Number )
         {
             red = first as Number;
             green = second as Number;
             blue = third as Number;
             return this;
         }
     }
     throw new Exception( "Color constructor takes 3 numbers" );
 }
예제 #9
0
파일: Array.cs 프로젝트: LukaHorvat/Kento
        public override Value Invoke(List Arguments)
        {
            dimensions = new List <int>();
            foreach (var dimension in Arguments.GetValues())
            {
                if (dimension is Number)
                {
                    dimensions.Add((int)((dimension as Number).Val));
                }
                else
                {
                    throw new Exception("Array constructor takes only numbers");
                }
            }
            var toReturn = MakeArray(0);

            Arr = toReturn;
            return(this);
        }
예제 #10
0
        public override Value Invoke(List Arguments)
        {
            var list = Arguments.GetValues();

            if (list[0] is Boolean)
            {
                var temp = new List <float>();
                for (int i = 1; i < list.Count; ++i)
                {
                    if (list[i] is Number)
                    {
                        temp.Add((float)((Number)list[i]).Val);
                    }
                }
                Polygon = new Polygon(((Boolean)list[0]).Val, temp.ToArray());
            }
            else
            {
                throw new Exception("First argument of the polygon constructor must be a boolean");
            }

            return(this);
        }
예제 #11
0
 public Function(List Arguments, CodeBlock Code, Scope Scope)
     : this(Arguments.GetValues().ConvertAll(X => X as String), Code.Value, Scope)
 {
 }