美文网首页
遍历枚举

遍历枚举

作者: 8fc08e44cf80 | 来源:发表于2017-05-16 10:19 被阅读0次

    public enum GestureTypes

    {

    SwipingLeft,

    SwipingRight,

    SwipingUp,

    SwipingDown,

    ThumbUp,

    ThumbDown,

    Fist,

    FaceUp,

    FaceDown,

    ClapHand,

    Grab,

    Throw

    }

    foreach (GestureTypes type in Enum.GetValues(typeof(GestureTypes)))

     {                       

     if (t.name.Equals (type.ToString ()))                      

      {                           

     print(t.name);                            

    print(type.ToString());                            

    _listActiveGestures.Add(type, t.GetComponent() as object);

    }

    }

    相关文章

      网友评论

          本文标题:遍历枚举

          本文链接:https://www.haomeiwen.com/subject/rzzkxxtx.html