Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 void MakeExplosionAtPoint(Spot s)
 {
     ExplosionNode explode = new ExplosionNode (spritesForLocation [map.LocationForXY (s.X, s.Y)]);
     explode.Position = GetCellPosition (s.X, s.Y);
     AddChild (explode);
 }