DeenGames.Valence.Tower.Controls.TowerSprite.TowerSprite C# (CSharp) Méthode

TowerSprite() public méthode

public TowerSprite ( Screen screen, string texture ) : System
screen FlatSilverBallTemplate.Screens.Screen
texture string
Résultat System
        public TowerSprite(Screen screen, string texture)
        {
            if (screen is TowerScreen)
            {
                // Automatically managed and removed
                TowerScreen t = screen as TowerScreen;
                this._sprite = t.AddSprite(texture);
                this._sprite.PixelSize = 0.5f;
                //this._sprite.AttachTo(this, true);
                this._sprite.CustomBehavior += new SpriteCustomBehavior(_sprite_CustomBehavior);
            }
            else
            {
                // User must manage them since we can't touch mTexts and mSprites.
                throw new ArgumentException(TowerUtils.USE_TOWER_FRAMEWORK_MESSAGE);
            }
        }