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

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