Example #1
0
File: Sprite.cs Project: T4g1/3eme
 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);
 }
Example #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);
        }
Example #3
0
File: Viseur.cs Project: T4g1/3eme
 public override void  Update(GameClock clock)
 {
     this.X = MouseState.X - (Width/2.0);
     this.Y = MouseState.Y - (Height / 2.0);
     
     base.Update(clock);
 }
Example #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);
        }
Example #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);
        }
Example #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);
        }
Example #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);
        }
Example #8
0
File: Mechant.cs Project: T4g1/3eme
 public override void  Update(GameClock clock)
 {
     base.Update(clock);
 }
Example #9
0
File: Mechant.cs Project: T4g1/3eme
 public override void  Update(GameClock clock)
 {
     base.Update(clock);
 }
Example #10
0
File: Sprite.cs Project: T4g1/3eme
 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);
 }