| ␍␊ |
| public override void Update(AxiosGameScreen gameScreen, GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)␍␊ |
| {␍␊ |
| if (gameScreen.IsActive) //only "tick" if the window has focus - otherwise the Timer will play catchup␍␊ |
| {␍␊ |
| if (_enabled)␍␊ |
| {␍␊ |
| if (gameTime.TotalGameTime - lastTick >= interval)␍␊ |
| {␍␊ |
| if (Tick != null)␍␊ |
| {␍␊ |
| //EventArgs e = new EventArgs();␍␊ |
| ␍␊ |
| if (_enabled)␍␊ |
| {␍␊ |
| if (gameTime.TotalGameTime - lastTick >= interval)␍␊ |
| Tick(this, null);␍␊ |
| }␍␊ |
| ␍␊ |
| lastTick = gameTime.TotalGameTime;␍␊ |
| }␍␊ |
| }␍␊ |
| else␍␊ |
| {␍␊ |
| if (Tick != null)␍␊ |
| {␍␊ |
| //EventArgs e = new EventArgs();␍␊ |
| ␍␊ |
| Tick(this, null);␍␊ |
| }␍␊ |
| ␍␊ |
| lastTick = gameTime.TotalGameTime;␍␊ |
| }␍␊ |
| }␍␊ |
| else␍␊ |
| {␍␊ |
| lastTick = gameTime.TotalGameTime;␍␊ |
| }␍␊ |
| }␍␊ |
| ␍␊ |
| public override void LoadContent(AxiosGameScreen gameScreen)␍␊ |