Пример #1
0
 public virtual void Update(GameClock clock)
 {
     this.Surface.Width  = this.Width;
     this.Surface.Height = this.Height;
     Canvas.SetLeft(this.Surface, this.X);
     Canvas.SetTop(this.Surface, this.Y);
 }
Пример #2
0
        public override void  Update(GameClock clock)
        {
            this.X = MouseState.X - (Width / 2.0);
            this.Y = MouseState.Y - (Height / 2.0);

            base.Update(clock);
        }
Пример #3
0
 public override void  Update(GameClock clock)
 {
     this.X = MouseState.X - (Width/2.0);
     this.Y = MouseState.Y - (Height / 2.0);
     
     base.Update(clock);
 }
Пример #4
0
        public override void Update(GameClock clock)
        {
            // Animation
            this._lastAnimation += clock.Elapsed.TotalMilliseconds;
            if (this._lastAnimation > 50)
            {
                this._lastAnimation = 0;
                this._currentTextureIndex = (this._currentTextureIndex + 1) % this.Textures.Count;

                this.Texture = this.Textures[this._currentTextureIndex];
                this.Surface.Fill = this.Texture.Brush;
            }

            // Tue l'unité
            life += clock.Elapsed.TotalMilliseconds;
            if (life > 3000 && Killable)
            {
                IsDead = true;
            }

            base.Update(clock);
        }
Пример #5
0
        public override void Update(GameClock clock)
        {
            // Animation
            this._lastAnimation += clock.Elapsed.TotalMilliseconds;
            if (this._lastAnimation > 50)
            {
                this._lastAnimation       = 0;
                this._currentTextureIndex = (this._currentTextureIndex + 1) % this.Textures.Count;

                this.Texture      = this.Textures[this._currentTextureIndex];
                this.Surface.Fill = this.Texture.Brush;
            }

            // Tue l'unité
            life += clock.Elapsed.TotalMilliseconds;
            if (life > 3000 && Killable)
            {
                IsDead = true;
            }

            base.Update(clock);
        }
Пример #6
0
        public MainPage()
        {
            InitializeComponent();
            _rand = new Random();

            //Cursor.Hide();

            this._clock = new GameClock();
            this._spawnClock = new GameClock();
            MouseState.Listen(this, this);

            CompositionTarget.Rendering += new EventHandler(CompositionTarget_Rendering);

            this._sprites = new List<Sprite>();

            this._viseur = new Viseur(this.graphicDevice);
            this._viseur.Load();

            this._sprites.Add(this._viseur);

            this._score = 0;

            this._spawnInterval = TimeSpan.FromSeconds(3);
        }
Пример #7
0
        public MainPage()
        {
            InitializeComponent();
            _rand = new Random();

            //Cursor.Hide();

            this._clock      = new GameClock();
            this._spawnClock = new GameClock();
            MouseState.Listen(this, this);

            CompositionTarget.Rendering += new EventHandler(CompositionTarget_Rendering);

            this._sprites = new List <Sprite>();

            this._viseur = new Viseur(this.graphicDevice);
            this._viseur.Load();

            this._sprites.Add(this._viseur);

            this._score = 0;

            this._spawnInterval = TimeSpan.FromSeconds(3);
        }
Пример #8
0
 public override void  Update(GameClock clock)
 {
     base.Update(clock);
 }
Пример #9
0
 public override void  Update(GameClock clock)
 {
     base.Update(clock);
 }
Пример #10
0
 public virtual void Update(GameClock clock)
 {
     this.Surface.Width = this.Width;
     this.Surface.Height = this.Height;
     Canvas.SetLeft(this.Surface, this.X);
     Canvas.SetTop(this.Surface, this.Y);
 }