private OTAPI.HookResult PreUpdateHandler(Terraria.Player terrariaPlayer, ref int playerIndex) { Debug.Assert(playerIndex >= 0 && playerIndex < Count); var player = this[playerIndex]; var evt = new PlayerTickEvent(player); _events.Raise(evt, _log); return(evt.IsCanceled ? OTAPI.HookResult.Cancel : OTAPI.HookResult.Continue); }
void HandleTick(PlayerTickEvent e) { if (projectType == ProjectType.FileProject) { timeline.CurrentTime = e.Time; buttonswidget.CurrentTime = e.Time; teamtagger.CurrentTime = e.Time; } }