public override string ToString()
        {
            var t = GetType();

            Logger.Debug(JintUnity.Utils.Join(", ", t.GetProperties().Select(e => e.Name)));
            return(t.Name.Substring(0, t.Name.Length - 7));
        }
Пример #2
0
 public static KeyCode AsKeyCode(JsValue value)
 {
     if (value == null)
     {
         Logger.Warn("invalid keycode: " + value);
         return(KeyCode.None);
     }
     else if (value.IsNumber())
     {
         return((KeyCode)TypeConverter.ToInt32(value));
     }
     else if (value.IsString())
     {
         return(AsKeyCode(TypeConverter.ToString(value)));
     }
     Logger.Warn("invalid keycode: " + value);
     return(KeyCode.None);
 }