public override object Convert(BlockSetLoadContext Context, Ancora.AstNode Node) { if (Node.NodeType == "NUMBER") return System.Convert.ToInt32(Node.Value); else if (Node.NodeType == "IDENT") return Context.NamedTiles[Node.Value.ToString()]; else throw new InvalidOperationException("Block property conversion error"); }
public override object Convert(BlockSetLoadContext Context, Ancora.AstNode Node) { return Node.Children.Select(c => c.Value.ToString()).ToArray(); }
public override object Convert(BlockSetLoadContext Context, Ancora.AstNode Node) { return Enum.Parse(EnumType, Node.Value.ToString()); }
public override object Convert(BlockSetLoadContext Context, Ancora.AstNode Node) { if (Node.Value.ToString() == "false") return false; else if (Node.Value.ToString() == "true") return true; else throw new InvalidOperationException("Block property conversion error"); }
public virtual Object Convert(BlockSetLoadContext Context, Ancora.AstNode Node) { throw new NotImplementedException(); }
public override object Convert(BlockSetLoadContext Context, Ancora.AstNode Node) { return Node.Value.ToString(); }