Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. public class CPlayer : Hybrid
  2. {
  3. public TextBox inputTBox { get; set; }
  4.  
  5. public CPlayer(TextBox InputTBox) : base(InputTBox)
  6. {
  7. inputTBox = InputTBox;
  8. }
  9.  
  10. public void initiateStats()
  11. {
  12. proteinMeterMax = 125;
  13. proteinMeterCurrent = 125;
  14. }
  15. }
  16.  
  17. public class Hybrid
  18. {
  19. public TextBox inputTBox { get; set; }
  20.  
  21. public bool stopOn = false;
  22.  
  23. public Hybrid(TextBox InputTBox)
  24. {
  25. inputTBox = InputTBox;
  26. }
  27.  
  28. public void runResult<T>(T hy) where T : Hybrid
  29. {
  30. stopOn = true;
  31. }
  32. }
  33.  
  34.  
  35. CPlayer cy = new CPlayer(inputBox);
  36.  
  37. public void doSomething() {
  38. cy.runResult(cy);
  39.  
  40. if (cy.stopOn) {
  41. //I want something to happen when this is true. But it keeps returning false.
  42. }
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement