void RedisplaySpot(Spot spot) { // Clear the information if needed var actualIndex = map.LocationForXY(spot.X, spot.Y); if (spritesForLocation.ContainsKey (actualIndex)) { this.RemoveChildren (new SKNode[] { spritesForLocation[actualIndex] }); spritesForLocation [actualIndex] = null; } var newSprite = GetSpriteForCell (map [spot.X, spot.Y]); AddChild (newSprite); spritesForLocation [actualIndex] = newSprite; }
void MakeExplosionAtPoint(Spot s) { ExplosionNode explode = new ExplosionNode (spritesForLocation [map.LocationForXY (s.X, s.Y)]); explode.Position = GetCellPosition (s.X, s.Y); AddChild (explode); }