Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CPlayer : Hybrid
- {
- public TextBox inputTBox { get; set; }
- public CPlayer(TextBox InputTBox) : base(InputTBox)
- {
- inputTBox = InputTBox;
- }
- public void initiateStats()
- {
- proteinMeterMax = 125;
- proteinMeterCurrent = 125;
- }
- }
- public class Hybrid
- {
- public TextBox inputTBox { get; set; }
- public bool stopOn = false;
- public Hybrid(TextBox InputTBox)
- {
- inputTBox = InputTBox;
- }
- public void runResult<T>(T hy) where T : Hybrid
- {
- stopOn = true;
- }
- }
- CPlayer cy = new CPlayer(inputBox);
- public void doSomething() {
- cy.runResult(cy);
- if (cy.stopOn) {
- //I want something to happen when this is true. But it keeps returning false.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement