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); }
public override void Update(GameClock clock) { this.X = MouseState.X - (Width / 2.0); this.Y = MouseState.Y - (Height / 2.0); base.Update(clock); }
public override void Update(GameClock clock) { this.X = MouseState.X - (Width/2.0); this.Y = MouseState.Y - (Height / 2.0); base.Update(clock); }
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); }
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); }
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); }
public override void Update(GameClock clock) { base.Update(clock); }