コード例 #1
0
ファイル: GameScene.cs プロジェクト: glennstephens/sweepy
        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;
        }
コード例 #2
0
ファイル: GameScene.cs プロジェクト: glennstephens/sweepy
 void MakeExplosionAtPoint(Spot s)
 {
     ExplosionNode explode = new ExplosionNode (spritesForLocation [map.LocationForXY (s.X, s.Y)]);
     explode.Position = GetCellPosition (s.X, s.Y);
     AddChild (explode);
 }