Пример #1
0
        protected override void LoadContent(ContentManager content)
        {
            this.balloonRed = new BalloonSprite(content.Load <Texture2D>("Balloon1_red"));

            this.balloons.Add(this.balloonRed.Create());

            //foreach (BalloonSprite balloon in this.balloons)
            //{
            //    balloon.Move(-balloon.Destination.Size.X, balloon.Destination.Size.Y);
            //}
        }
Пример #2
0
        public BalloonFactory(ContentManager content, BaseLevel level)
        {
            this.Level = level;

            this.balloon1 = new BalloonSprite(content.Load <Texture2D>("Balloon1"));

            this.timerCreate           = new Timer();
            this.timerCreate.AutoReset = false;
            this.timerCreate.Interval  = 10;

            this.timerCreate.Elapsed += timerCreate_Elapsed;
        }