public void Reaction(JibbyButton jibby, GameTime gameTime) { count += (float)gameTime.ElapsedGameTime.TotalSeconds; if (count < timer) { jibby.Texture = state; } else { jibby.IsWashing = false; } }
public World() { background = new Backround(new Vector2(0, 0)); jibby = new JibbyButton(new Vector2((Game1.game.GraphicsDevice.Viewport.Width / 2) - 175, 0)); wash = new Wash(new Vector2((Game1.game.GraphicsDevice.Viewport.Width / 2) - 250, Game1.game.GraphicsDevice.Viewport.Height - 110)); wash.SetJibby(jibby); food = new Food(new Vector2((Game1.game.GraphicsDevice.Viewport.Width / 2), Game1.game.GraphicsDevice.Viewport.Height - 110)); food.SetJibby(jibby); pointer = new MousePointer(); }
public void Update(JibbyButton jibby) { state = Mouse.GetState(); position = new Vector2(state.X, state.Y); if (jibby.Rectangle.Contains(position)) { if (state.LeftButton == ButtonState.Pressed) { texture = handClosed; } else { texture = handOpen; } } else { texture = pointer; } }
public override void SetJibby(JibbyButton jibby) { base.SetJibby(jibby); }
public void Reaction(JibbyButton jibby, GameTime gameTime) { jibby.Texture = state; }
public virtual void SetJibby(JibbyButton jibby) { this.jibby = jibby; }