Exemple #1
0
 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");
 }
Exemple #2
0
 public override object Convert(BlockSetLoadContext Context, Ancora.AstNode Node)
 {
     return Node.Children.Select(c => c.Value.ToString()).ToArray();
 }
Exemple #3
0
 public override object Convert(BlockSetLoadContext Context, Ancora.AstNode Node)
 {
     return Enum.Parse(EnumType, Node.Value.ToString());
 }
Exemple #4
0
 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");
 }
Exemple #5
0
 public virtual Object Convert(BlockSetLoadContext Context, Ancora.AstNode Node)
 {
     throw new NotImplementedException();
 }
Exemple #6
0
 public override object Convert(BlockSetLoadContext Context, Ancora.AstNode Node)
 {
     return Node.Value.ToString();
 }