public static string GetMechanicTypeString(MechanicType type) { switch (type) { case MechanicType.Lines: return "LINES"; case MechanicType.Match3: return "MATCH 3"; case MechanicType.SwipeLines: return "SWIPE MATCH 3"; } return string.Empty; }
public override void ParseJson(JSONNode json) { MechanicType = (MechanicType)Enum.Parse(typeof(MechanicType), json["mechanic"].ToString().Replace("\"", "")); PlayfieldType = (PlayfieldType)Enum.Parse(typeof(PlayfieldType), json["playfield"].ToString().Replace("\"", "")); }
void SetMechanicType(MechanicType mt = MechanicType.Match3) { mechanic = mt; }