Exemplo n.º 1
0
        public void Reaction(JibbyButton jibby, GameTime gameTime)
        {
            count += (float)gameTime.ElapsedGameTime.TotalSeconds;

            if (count < timer)
            {
                jibby.Texture = state;
            }
            else
            {
                jibby.IsWashing = false;
            }
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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;
            }
        }
Exemplo n.º 4
0
 public override void SetJibby(JibbyButton jibby)
 {
     base.SetJibby(jibby);
 }
Exemplo n.º 5
0
 public void Reaction(JibbyButton jibby, GameTime gameTime)
 {
     jibby.Texture = state;
 }
Exemplo n.º 6
0
 public virtual void SetJibby(JibbyButton jibby)
 {
     this.jibby = jibby;
 }