private void DecodeImage(string encoded) { int encodedPos = 0; while (encodedPos < encoded.Length) { List <int[]> image = new List <int[]>(); for (int i = 0; i < Height; i++) { List <int> row = new List <int>(); for (int j = 0; j < Width; j++) { var cur = "" + encoded[encodedPos++]; if (int.TryParse(cur, out int result)) { row.Add(result); } } image.Add(row.ToArray()); } ImageLayers.Add(new ImageLayer(Width, Height, image.ToArray())); } }
public HallsSouth(Game game, Torch.Object parent, byte[] data) : base(game, data) { Name = "Coliseum Halls South"; SandbagImage = "Zones/Coliseum/Halls/south-sb"; Sandbag = Grid.FromBitmap(Game.Services, SandbagImage); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Coliseum/Halls/south")); Doors.Add(new Door { Location = new Rectangle(345, 550, 50, 35), Name = "cell", Orientation = Direction.Up }); Doors.Add(new Door { Location = new Rectangle(100, 100, 50, 35), Name = "halls-north", Orientation = Direction.Down }); Doors.Add(new Door { Location = new Rectangle(660, 300, 35, 50), Name = "halls-east", Orientation = Direction.Left }); Objects.Add(new InteractiveObject { Interact = SimpleDoor("coliseum/cell", "halls"), Location = new Rectangle(345, 585, 50, 25) }); Objects.Add(new InteractiveObject { Interact = SimpleDoor("coliseum/halls-north", "halls-south"), Location = new Rectangle(100, 90, 50, 15) }); Objects.Add(new InteractiveObject { Interact = SimpleDoor("coliseum/halls-east", "halls-south"), Location = new Rectangle(700, 300, 15, 50) }); }
public Village(Game game, Torch.Object parent, byte[] data) : base(game, data) { Name = "Desert Village"; SandbagImage = "Zones/Village/Village/sandbag"; Sandbag = Grid.FromBitmap(Game.Services, SandbagImage); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Village/Village/village")); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Village/Village/inn") { X = 840, Y = 1372, DrawOrder = 1752 }); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Village/Village/warehouse") { X = 155, Y = 1300, DrawOrder = 1918 }); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Village/Village/well") { X = 1400, Y = 863, DrawOrder = 977 }); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Village/Village/Posts1") { X = 70, Y = 1940, DrawOrder = 2100 }); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Village/Village/house") { X = 754, Y = 701, DrawOrder = 1094 }); Objects.Add(new InteractiveObject { Interact = SimpleDoor("village/shop", "village"), Location = new Rectangle(164 * 6, 192 * 6, 80, 40) }); Doors.Add(new Door { Location = new Rectangle(1442, 2057, 171, 37), Name = "coliseum", Orientation = Direction.Up, Zone = "coliseum/halls-north", ZoneDoor = "village" }); Doors.Add(new Door { Location = new Rectangle(69 * 6, 315 * 6, 9 * 6, 2), Name = "warehouse", Orientation = Direction.Down, Zone = "village/warehouse", ZoneDoor = "entrance" }); Doors.Add(new Door { Location = new Rectangle(69 * 6, 320 * 6, 9 * 6, 2), Name = "warehouse exit", Orientation = Direction.Down }); Doors.Add(new Door { Location = new Rectangle(177 * 6, 288 * 6, 12 * 6, 2), Name = "inn", Orientation = Direction.Down, Zone = "village/inn", ZoneDoor = "entrance" }); Doors.Add(new Door { Location = new Rectangle(177 * 6, 295 * 6, 12 * 6, 2), Name = "inn exit", Orientation = Direction.Down }); Doors.Add(new Door { Location = new Rectangle(164 * 6, 200 * 6, 80, 40), Name = "shop", Orientation = Direction.Down }); }
/// <summary> /// Returns the image layer with the given name. /// </summary> /// <param name="name">The name of the image layer to find.</param> /// <returns>The image layer with the given name.</returns> public ImageLayer GetImageLayer(string name) { try { return(ImageLayers.Find(item => item.Name == name)); } catch { throw new Exception("\nCould not find the given ImageLayer."); } }
public HallsEast(Game game, Torch.Object parent, byte[] data) : base(game, data) { Name = "Coliseum Halls East"; SandbagImage = "Zones/Coliseum/Halls/east-sb"; Sandbag = Grid.FromBitmap(Game.Services, SandbagImage); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Coliseum/Halls/east")); Doors.Add(new Door {Location = new Rectangle(60, 450, 35, 50), Name = "halls-south", Orientation = Direction.Right }); Objects.Add(new InteractiveObject { Interact = SimpleDoor("coliseum/halls-south", "halls-east"), Location = new Rectangle(50, 450, 15, 50) }); }
public Warehouse(Game game, Torch.Object parent, byte[] data) : base(game, data) { Name = "Village Warehouse"; SandbagImage = "Zones/Village/Warehouse/sandbag"; Sandbag = Grid.FromBitmap(Game.Services, SandbagImage); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Village/Warehouse/warehouse")); Doors.Add(new Door { Location = new Rectangle(56 * 6, 130 * 6, 10 * 6, 1), Name = "entrance", Orientation = Direction.Up, Zone = "village/village", ZoneDoor = "warehouse exit" }); }
public void TestAddLayer_success() { IList <ILayer> expectedLayers = new[] { mockLayer, mockReferenceLayer, mockDigestOnlyLayer }; ImageLayers imageLayers = ImageLayers.CreateBuilder() .Add(mockLayer) .Add(mockReferenceLayer) .Add(mockDigestOnlyLayer) .Build(); Assert.AreEqual(imageLayers.GetLayers(), expectedLayers); }
public TmxMap(string filename) : this() { XDocument xDoc = ReadXml(filename); var xMap = xDoc.Element("map"); if (xMap == null) { throw new ArgumentOutOfRangeException("filename", "The given file is ether invalid xml or dos not contain a map element"); } Version = (string)xMap.Attribute("version"); Orientation = (EOrientationType)Enum.Parse(typeof(EOrientationType), xMap.Attribute("orientation").Value, true); Width = (int)xMap.Attribute("width"); Height = (int)xMap.Attribute("height"); TileWidth = (int)xMap.Attribute("tilewidth"); TileHeight = (int)xMap.Attribute("tileheight"); var xBackgroundColor = (string)xMap.Attribute("backgroundcolor"); if (xBackgroundColor != null) { xBackgroundColor = xBackgroundColor.TrimStart("#".ToCharArray()); BackgroundColor = UInt32.Parse(xBackgroundColor, NumberStyles.HexNumber); } foreach (var e in xMap.Elements("tileset")) { Tilesets.Add(new TmxTileset(e, TmxDirectory)); } foreach (var e in xMap.Elements("layer")) { Layers.Add(new TmxLayer(this, e, Width, Height)); } foreach (var e in xMap.Elements("objectgroup")) { ObjectGroups.Add(new TmxObjectGroup(e)); } foreach (var e in xMap.Elements("imagelayer")) { ImageLayers.Add(new TmxImageLayer(this, e, TmxDirectory)); } Properties.AddRange(xMap.Element("properties")); }
public Inn(Game game, Torch.Object parent, byte[] data) : base(game, data) { Name = "Village Inn"; SandbagImage = "Zones/Village/Inn/sandbag"; Sandbag = Grid.FromBitmap(Game.Services, SandbagImage); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Village/Inn/inn")); Doors.Add(new Door { Location = new Rectangle(63 * 6, 93 * 6, 13 * 6, 2), Zone = "village/village", ZoneDoor = "inn exit", Name = "entrance", Orientation = Direction.Up }); Doors.Add(new Door { Location = new Rectangle(215, 265, 75, 75), Name = "save", Orientation = Direction.Down }); AddSavepoint(215, 265); }
public async Task TestRun_emptyLayersIgnoredAsync() { ImmutableArray <ILayerConfiguration> fakeLayerConfigurations = ImmutableArray.Create( fakeDependenciesLayerConfiguration, emptyLayerConfiguration, fakeResourcesLayerConfiguration, fakeClassesLayerConfiguration, emptyLayerConfiguration); Mock.Get(mockBuildConfiguration).Setup(m => m.GetLayerConfigurations()).Returns(fakeLayerConfigurations); // Populates the cache. ImageLayers applicationLayers = await BuildFakeLayersToCacheAsync().ConfigureAwait(false); Assert.AreEqual(3, applicationLayers.Size()); ImmutableArray <LayerEntry> dependenciesLayerEntries = fakeLayerConfigurations[0].LayerEntries; ImmutableArray <LayerEntry> resourcesLayerEntries = fakeLayerConfigurations[2].LayerEntries; ImmutableArray <LayerEntry> classesLayerEntries = fakeLayerConfigurations[3].LayerEntries; CachedLayer dependenciesCachedLayer = await cache.RetrieveAsync(dependenciesLayerEntries).OrElseThrowAsync(() => new AssertionException("")).ConfigureAwait(false); CachedLayer resourcesCachedLayer = await cache.RetrieveAsync(resourcesLayerEntries).OrElseThrowAsync(() => new AssertionException("")).ConfigureAwait(false); CachedLayer classesCachedLayer = await cache.RetrieveAsync(classesLayerEntries).OrElseThrowAsync(() => new AssertionException("")).ConfigureAwait(false); // Verifies that the cached layers are up-to-date. Assert.AreEqual( applicationLayers.Get(0).GetBlobDescriptor().GetDigest(), dependenciesCachedLayer.GetDigest()); Assert.AreEqual( applicationLayers.Get(1).GetBlobDescriptor().GetDigest(), resourcesCachedLayer.GetDigest()); Assert.AreEqual( applicationLayers.Get(2).GetBlobDescriptor().GetDigest(), classesCachedLayer.GetDigest()); // Verifies that the cache reader gets the same layers as the newest application layers. await AssertBlobsEqualAsync(applicationLayers.Get(0).GetBlob(), dependenciesCachedLayer.GetBlob()).ConfigureAwait(false); await AssertBlobsEqualAsync(applicationLayers.Get(1).GetBlob(), resourcesCachedLayer.GetBlob()).ConfigureAwait(false); await AssertBlobsEqualAsync(applicationLayers.Get(2).GetBlob(), classesCachedLayer.GetBlob()).ConfigureAwait(false); }
public Shop(Game game, Torch.Object parent, byte[] data) : base(game, data) { Name = "Village Shop"; SandbagImage = "Zones/Village/Shop/sandbag"; Sandbag = Grid.FromBitmap(Game.Services, SandbagImage); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Village/Shop/shop")); Objects.Add(new InteractiveObject { Interact = Merchant, Location = new Rectangle(47 * 6, 44 * 6, 8 * 6, 6) }); Doors.Add(new Door { Location = new Rectangle(33 * 6, 67 * 6, 8 * 6, 6), Name = "village", Orientation = Direction.Up, Zone = "village/village", ZoneDoor = "shop" }); }
private async Task <ImageLayers> BuildFakeLayersToCacheAsync() { ImageLayers.Builder applicationLayersBuilder = ImageLayers.CreateBuilder(); IAsyncStep <IReadOnlyList <ICachedLayer> > buildAndCacheApplicationLayersStep = BuildAndCacheApplicationLayerStep.MakeList( mockBuildConfiguration, ProgressEventDispatcher.NewRoot(mockEventHandlers, "ignored", 1).NewChildProducer()); foreach (ICachedLayer applicationLayer in await buildAndCacheApplicationLayersStep.GetFuture().ConfigureAwait(false)) { applicationLayersBuilder.Add(applicationLayer); } return(applicationLayersBuilder.Build()); }
public void TestAddLayer_maintainDuplicates() { // must maintain duplicate IList <ILayer> expectedLayers = new[] { mockLayer, mockReferenceLayer, mockDigestOnlyLayer, mockLayer2, mockLayer }; ImageLayers imageLayers = ImageLayers.CreateBuilder() .Add(mockLayer) .Add(mockReferenceLayer) .Add(mockDigestOnlyLayer) .Add(mockLayer2) .Add(mockLayer) .Build(); Assert.AreEqual(expectedLayers, imageLayers.GetLayers()); }
public void TestAddLayer_removeDuplicates() { // remove duplicates: last layer should be kept IList <ILayer> expectedLayers = new[] { mockReferenceLayer, mockDigestOnlyLayer, mockLayer2, mockLayer }; ImageLayers imageLayers = ImageLayers.CreateBuilder() .RemoveDuplicates() .Add(mockLayer) .Add(mockReferenceLayer) .Add(mockDigestOnlyLayer) .Add(mockLayer2) .Add(mockLayer) .Build(); Assert.AreEqual(expectedLayers, imageLayers.GetLayers()); }
public TmxMap(XMLReader reader, string?filePath = null) { XMLReader?xMap = reader.Element("map"); if (xMap == null) { return; } Version = xMap.Attribute("version"); TiledVersion = xMap.Attribute("tiledversion"); Width = xMap.AttributeInt("width"); Height = xMap.AttributeInt("height"); TileWidth = xMap.AttributeInt("tilewidth"); TileHeight = xMap.AttributeInt("tileheight"); HexSideLength = xMap.AttributeIntN("hexsidelength"); Orientation = xMap.AttributeEnum <Orientation>("orientation"); StaggerAxis = xMap.AttributeEnum <StaggerAxis>("staggeraxis"); StaggerIndex = xMap.AttributeEnum <StaggerIndex>("staggerindex"); RenderOrder = xMap.AttributeEnum <RenderOrder>("renderorder"); NextObjectId = xMap.AttributeIntN("nextobjectid"); BackgroundColor = TmxHelpers.ParseTmxColor(xMap.Attribute("backgroundcolor")); Properties = TmxHelpers.GetPropertyDict(xMap.Element("properties")); foreach (XMLReader e in xMap.Elements("tileset")) { string?fileSource = e.Attribute("source"); int firstGid = e.AttributeInt("firstgid"); // Check if external file. if (!string.IsNullOrEmpty(fileSource)) { if (filePath != null) { string directory = AssetLoader.GetDirectoryName(filePath); fileSource = AssetLoader.GetNonRelativePath(directory, fileSource); } var textAsset = Engine.AssetLoader.Get <TextAsset>(fileSource); if (textAsset?.Content == null) { Engine.Log.Warning("Couldn't load external tileset.", MessageSource.TMX); continue; } var externalReader = new XMLReader(textAsset.Content); XMLReader?tileSetElement = externalReader.Element("tileset"); if (tileSetElement == null) { continue; } Tilesets.Add(new TmxTileset(firstGid, tileSetElement)); continue; } Tilesets.Add(new TmxTileset(firstGid, e)); } foreach (XMLReader e in xMap.Elements().Where(x => x.Name == "layer" || x.Name == "objectgroup" || x.Name == "imagelayer" || x.Name == "group")) { TmxLayer layer; switch (e.Name) { case "layer": var tileLayer = new TmxLayer(e, Width, Height); layer = tileLayer; TileLayers.Add(tileLayer); break; case "objectgroup": var objectLayer = new TmxObjectLayer(e); layer = objectLayer; ObjectLayers.Add(objectLayer); break; case "imagelayer": var imageLayer = new TmxImageLayer(e); layer = imageLayer; ImageLayers.Add(imageLayer); break; case "group": var group = new TmxGroupedLayers(e, Width, Height); layer = group; Groups.Add(group); break; default: Engine.Log.Warning($"Unknown TMX layer type {e.Name}.", MessageSource.TMX); continue; } Layers.Add(layer); } }
public HallsNorth(Game game, Torch.Object parent, byte[] data) : base(game, data) { Name = "Coliseum Halls North"; SandbagImage = "Zones/Coliseum/Halls/north-sb"; Sandbag = Grid.FromBitmap(Game.Services, SandbagImage); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Coliseum/Halls/north")); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Coliseum/pillar") { X = 393, Y = 190, DrawOrder = 248 }); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Coliseum/pillar") { X = 393, Y = 390, DrawOrder = 448 }); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Coliseum/pillar") { X = 393, Y = 590, DrawOrder = 648 }); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Coliseum/pillar") { X = 593, Y = 190, DrawOrder = 248 }); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Coliseum/pillar") { X = 593, Y = 390, DrawOrder = 448 }); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Coliseum/pillar") { X = 593, Y = 590, DrawOrder = 648 }); Doors.Add(new Door { Location = new Rectangle(500, 715, 50, 35), Name = "halls-south", Orientation = Direction.Up }); Doors.Add(new Door { Location = new Rectangle(455, 100, 140, 35), Name = "village", Orientation = Direction.Up }); Objects.Add(new InteractiveObject { Interact = SimpleDoor("coliseum/halls-south", "halls-north"), Location = new Rectangle(500, 740, 50, 15) }); Objects.Add(new InteractiveObject { Interact = SimpleDoor("village/village", "coliseum"), Location = new Rectangle(455, 90, 140, 15) }); Objects.Add(new InteractiveObject { Interact = TestBattle("coliseum/halls"), Location = new Rectangle(400, 200, 50, 50) }); Objects.Add(new InteractiveObject { Interact = TestBattle("coliseum/halls"), Location = new Rectangle(400, 400, 50, 50) }); Objects.Add(new InteractiveObject { Interact = TestBattle("coliseum/halls"), Location = new Rectangle(400, 600, 50, 50) }); Objects.Add(new InteractiveObject { Interact = TestBattle("coliseum/halls"), Location = new Rectangle(600, 200, 50, 50) }); Objects.Add(new InteractiveObject { Interact = TestBattle("coliseum/halls"), Location = new Rectangle(600, 400, 50, 50) }); Objects.Add(new InteractiveObject { Interact = TestBattle("coliseum/halls"), Location = new Rectangle(600, 600, 50, 50) }); }
public Cell(Game game, Torch.Object parent, byte[] data) : base(game, data) { Name = "Coliseum Slave Cells"; SandbagImage = "Zones/Coliseum/Cell/sandbag"; Sandbag = Grid.FromBitmap(Game.Services, SandbagImage); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Coliseum/Cell/cell")); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Coliseum/Cell/bars") { X = 50, Y = 300, DrawOrder = 350 }); ImageLayers.Add(new ImageObject(Game, parent, "Zones/Coliseum/Cell/bars") { X = 50, Y = 500, DrawOrder = 550 }); Doors.Add(new Door { Location = new Rectangle(100, 650, 7 * 6, 8 * 6), Name = "bed", Orientation = Direction.Right }); Doors.Add(new Door { Location = new Rectangle(905, 200, 45, 25), Name = "halls", Orientation = Direction.Down }); Objects.Add(new InteractiveObject { Interact = SimpleDoor("coliseum/halls-south", "cell"), Location = new Rectangle(905, 190, 45, 15) }); #if DEBUG Objects.Add(new InteractiveObject { Interact = TestBattle("coliseum/halls"), Location = new Rectangle(230, 550, 10, 50) }); #endif var propsSprite = new SpriteObject(Game, parent, "Zones/Coliseum/Cell/props"); propsSprite.AddAnimation("barrel1", new SpriteAnimation { FrameRate = 1, FrameCount = 1, Size = new Rectangle(0, 0, 41, 51), StartRow = 63, StartCol = 99 }); propsSprite.AddAnimation("barrel2", new SpriteAnimation { FrameRate = 1, FrameCount = 1, Size = new Rectangle(0, 0, 41, 50), StartRow = 63, StartCol = 140 }); propsSprite.AddAnimation("bed1", new SpriteAnimation { FrameRate = 1, FrameCount = 1, Size = new Rectangle(0, 0, 94, 50), StartRow = 0, StartCol = 161 }); propsSprite.AddAnimation("bed1-r", new SpriteAnimation { FrameRate = 1, FrameCount = 1, Size = new Rectangle(0, 0, 94, 50), StartRow = 0, StartCol = 161 }); propsSprite.AddAnimation("bed2", new SpriteAnimation { FrameRate = 1, FrameCount = 1, Size = new Rectangle(0, 0, 47, 87), StartRow = 0, StartCol = 52 }); propsSprite.AddAnimation("bone", new SpriteAnimation { FrameRate = 1, FrameCount = 1, Size = new Rectangle(0, 0, 29, 16), StartRow = 95, StartCol = 0 }); propsSprite.AddAnimation("boots", new SpriteAnimation { FrameRate = 1, FrameCount = 1, Size = new Rectangle(0, 0, 33, 33), StartRow = 50, StartCol = 218 }); propsSprite.AddAnimation("bucket", new SpriteAnimation { FrameRate = 1, FrameCount = 1, Size = new Rectangle(0, 0, 30, 34), StartRow = 83, StartCol = 218 }); propsSprite.AddAnimation("chest1", new SpriteAnimation { FrameRate = 1, FrameCount = 1, Size = new Rectangle(0, 0, 52, 95), StartRow = 0, StartCol = 0 }); propsSprite.AddAnimation("pillar", new SpriteAnimation { FrameRate = 1, FrameCount = 1, Size = new Rectangle(0, 0, 62, 63), StartRow = 0, StartCol = 99 }); propsSprite.AddAnimation("skull", new SpriteAnimation { FrameRate = 1, FrameCount = 1, Size = new Rectangle(0, 0, 30, 28), StartRow = 87, StartCol = 52 }); propsSprite.AddAnimation("stool", new SpriteAnimation { FrameRate = 1, FrameCount = 1, Size = new Rectangle(0, 0, 37, 36), StartRow = 50, StartCol = 181 }); // bottom left room props ImageLayers.Add(propsSprite.Clone("bed2", 50, 550, 550)); ImageLayers.Add(propsSprite.Clone("bed1-r", 145, 700, 150)); ImageLayers.Add(propsSprite.Clone("bucket", 60, 700, 60)); ImageLayers.Add(propsSprite.Clone("stool", 175, 640, 60)); // bottom middle room props ImageLayers.Add(propsSprite.Clone("bed2", 260, 550, 550)); ImageLayers.Add(propsSprite.Clone("bed2", 440, 550, 550)); ImageLayers.Add(propsSprite.Clone("bucket", 270, 700, 270)); ImageLayers.Add(propsSprite.Clone("boots", 450, 640, 270)); // bottom right room props ImageLayers.Add(propsSprite.Clone("bed2", 510, 550, 550)); ImageLayers.Add(propsSprite.Clone("bed1-r", 515, 700, 150)); ImageLayers.Add(propsSprite.Clone("skull", 665, 710, 60)); ImageLayers.Add(propsSprite.Clone("bucket", 655, 660, 60)); // top left room props ImageLayers.Add(propsSprite.Clone("bed2", 50, 100, 100)); ImageLayers.Add(propsSprite.Clone("bed1-r", 50, 300, 150)); ImageLayers.Add(propsSprite.Clone("bucket", 200, 100, 150)); // top middle room props ImageLayers.Add(propsSprite.Clone("bed2", 260, 100, 100)); ImageLayers.Add(propsSprite.Clone("bed2", 440, 100, 100)); ImageLayers.Add(propsSprite.Clone("bucket", 270, 250, 270)); ImageLayers.Add(propsSprite.Clone("boots", 450, 190, 190)); // top right room props ImageLayers.Add(propsSprite.Clone("barrel1", 650, 100, 100)); ImageLayers.Add(propsSprite.Clone("bed1", 515, 100, 100)); // outside the cells ImageLayers.Add(propsSprite.Clone("chest1", 50, 380, 50)); Characters.Add("guard", Avatar.GenerateAvatar(game, null, "enemy")); if (data.Length == 0) { data = new byte[1]; } if (data[0] == 0x00) { Characters["guard"].Location.X = 150; Characters["guard"].Location.Y = 440; } else { Characters["guard"].Location.X = 97; Characters["guard"].Location.Y = 440; Characters["guard"].UpdateVelocity(1, 0); Characters["guard"].UpdateVelocity(0, 0); _guardMoved = true; } Characters["guard"].Interact = TalkToGuard; }