public static Cassette FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); Cassette entity = new Cassette(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static TouchSwitch FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); TouchSwitch entity = new TouchSwitch(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static TrapDoor FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); TrapDoor entity = new TrapDoor(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static FriendlyGhost FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); FriendlyGhost entity = new FriendlyGhost(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static DarkChaser FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); DarkChaser entity = new DarkChaser(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static IntroCar FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); IntroCar entity = new IntroCar(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static ForegroundDebris FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); ForegroundDebris entity = new ForegroundDebris(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static Memorial FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); Memorial entity = new Memorial(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static Payphone FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); Payphone entity = new Payphone(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static PlayerSpawn FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); PlayerSpawn entity = new PlayerSpawn(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static Door FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); Door entity = new Door(node.Attr("type", "wood")); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static ClutterCabinet FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); ClutterCabinet entity = new ClutterCabinet(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static Checkpoint FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); Checkpoint entity = new Checkpoint(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static BlockField FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); BlockField entity = new BlockField(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static LockBlock FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); LockBlock entity = new LockBlock(node.Attr("sprite", "wood")); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static WaterFall FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); WaterFall entity = new WaterFall(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static ResortLantern FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); ResortLantern entity = new ResortLantern(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static Haha FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); Haha entity = new Haha(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static SoundSource FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); SoundSource entity = new SoundSource(); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static NPC FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); string name = node.Attr("npc"); NPC entity = new NPC(name); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static Bridge FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); int width = node.AttrInt("width", 0); List <MapElement> nodes = node.SelectChildren("node"); Bridge entity = new Bridge(width, nodes[0].AttrInt("x"), nodes[1].AttrInt("x")); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static Spring FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); bool canUse = node.AttrBool("PlayerCanUse", true); Spring entity = new Spring(canUse); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static HangingLamp FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); int height = node.AttrInt("height", 0); HangingLamp entity = new HangingLamp(height); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static Lamp FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); bool broken = node.AttrBool("broken", false); Lamp entity = new Lamp(broken); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static BridgeFixed FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); int width = node.AttrInt("width", 0); BridgeFixed entity = new BridgeFixed(width); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static CrumbleBlock FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); int width = node.AttrInt("width", 0); string texture = node.Attr("texture", "default"); CrumbleBlock entity = new CrumbleBlock(texture, width); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static SinkingPlatform FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); int width = node.AttrInt("width", 0); SinkingPlatform entity = new SinkingPlatform(width); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static JumpThru FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); int width = node.AttrInt("width", 0); JumpThru entity = new JumpThru(node.Attr("texture", "default"), width); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static ColorSwitch FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); string type = node.Attr("type", "green"); ColorSwitch entity = new ColorSwitch(type.Equals("green", StringComparison.OrdinalIgnoreCase) ? BlockColor.Green : type.Equals("red", StringComparison.OrdinalIgnoreCase) ? BlockColor.Red : BlockColor.Yellow); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static ClutterBlock FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); int width = node.AttrInt("width", 0); int height = node.AttrInt("height", 0); ClutterBlock entity = new ClutterBlock(node.Name.Equals("redBlocks") ? BlockColor.Red : node.Name.Equals("greenBlocks") ? BlockColor.Green : BlockColor.Yellow, width, height); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }