예제 #1
0
        /// <summary>
        /// Creates a new sprite of a falling block
        /// </summary>
        /// <param name="game">Game to bind to</param>
        /// <param name="source">Data</param>
        public SpriteFallingBlock(Game game, Data.FallingBlock source) : base(game)
        {
            this.Source      = source;
            this.TextureName = "Graphics/blank";
            this.Size        = (SpriteField.GridCellSize - 1) * Vector2.One;
            this.Color       = Data.Block.GetColor(source.Block.Type);

            source.Block.OnTypeChanged += new Services.BlockTypeDelegate(source_Block_OnTypeChanged);
        }
예제 #2
0
 /// <summary>
 /// Creates a new sprite of a falling block
 /// </summary>
 /// <param name="game">Game to bind to</param>
 /// <param name="source">Data</param>
 public SpriteGhostBlock(Game game, Data.FallingBlock source)
     : base(game, source)
 {
     this.Opacity = 0.1f;
     this.Source.Block.OnTypeChanged += new Services.BlockTypeDelegate(Block_OnTypeChanged);
 }