Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Microsoft.Xna.Framework;
  7. using Microsoft.Xna.Framework.Graphics;
  8. using Microsoft.Xna.Framework.Input;
  9.  
  10.  
  11. namespace Game1
  12. {
  13. class Button
  14. {
  15. private bool _isClicked;
  16. public void Update(MouseState mouse)
  17. {
  18. if (mouse.LeftButton == ButtonState.Pressed)
  19. _isClicked = true;
  20. else
  21. _isClicked = false;
  22.  
  23. }
  24. public void SetCliecked(bool isClicked)
  25. {
  26. _isClicked = isClicked;
  27. }
  28. public bool IsClicked()
  29. {
  30. return _isClicked;
  31. }
  32.  
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement