示例#1
0
 public FieldItemDefinition(ushort id, ushort dig, ushort pick, string name, FieldItemKind kind)
 {
     Index = id;
     Dig   = dig;
     Pick  = pick;
     Name  = name;
     Kind  = kind;
 }
示例#2
0
 public static ItemKind ToItemKind(this FieldItemKind type)
 {
     if (type.IsTree())
     {
         return(ItemKind.Kind_Tree);
     }
     if (type.IsFlower())
     {
         return(ItemKind.Kind_Flower);
     }
     if (type.IsWeed())
     {
         return(ItemKind.Kind_Weed);
     }
     return(ItemKind.Unknown);
 }
示例#3
0
 public static bool IsWeed(this FieldItemKind type) => type is >= PltWeedAut0 and <= PltWeedWin1;
示例#4
0
 public static bool IsStone(this FieldItemKind type) => StoneA <= type && type <= StoneE;
示例#5
0
 public static bool IsTree(this FieldItemKind type) => PltTreeBamboo <= type && type <= PltTreePalm;
示例#6
0
 public static bool IsFlower(this FieldItemKind type) => PltFlwAnemone <= type && type <= PltFlwYuri;
示例#7
0
 public static bool IsBush(this FieldItemKind type) => PltBushAzalea <= type && type <= PltBushOsmanthus;
示例#8
0
 public static bool IsFence(this FieldItemKind type) => FenceBamboo <= type && type <= FenceWoodWhite;
示例#9
0
 public static bool IsPlant(this FieldItemKind type) => PltFlwAnemone <= type && type <= PltWeedWin1;
示例#10
0
 public static bool IsWeed(this FieldItemKind type) => PltWeedAut0 <= type && type <= PltWeedWin1;
示例#11
0
 public FieldItemDefinition(ushort id, string name, FieldItemKind kind)
 {
     Index = id;
     Name  = name;
     Kind  = kind;
 }