public void ShowLineWindow(Game.GameLine line, int x, int y) { var wnd = new LineWindow(this, game.Track, line); ShowDialog(wnd); wnd.SetPosition(x - wnd.Width / 2, y - wnd.Height / 2); }
private void Unregister(GameLine l, int x, int y) { LineContainer<GameLine> cell; var pos = GetCellKey(x, y); if (!Cells.TryGetValue(pos, out cell)) return; cell.RemoveLine(l.ID); }
private void Unregister(GameLine l, int x, int y) { EditorCell cell; var pos = GetCellKey(x, y); if (!Cells.TryGetValue(pos, out cell)) { return; } cell.RemoveLine(l.ID); }
private void Register(GameLine l, int x, int y) { var key = GetCellKey(x, y); LineContainer<GameLine> cell; if (!Cells.TryGetValue(key, out cell)) { cell = new LineContainer<GameLine>(); Cells[key] = cell; } cell.AddLine(l); }
private void Register(GameLine l, int x, int y) { var key = GetCellKey(x, y); EditorCell cell; if (!Cells.TryGetValue(key, out cell)) { cell = new EditorCell(); Cells[key] = cell; } cell.AddLine(l); }
public void AddLine(GameLine line) { var pts = GetPointsOnLine(line.Position.X / CellSize, line.Position.Y / CellSize, line.Position2.X / CellSize, line.Position2.Y / CellSize); using (Sync.AcquireWrite()) { foreach (var pos in pts) { Register(line, pos.X, pos.Y); } } }
public void TriggerChanged(GameLine line) { int framehit; using (_framesync.AcquireWrite()) { framehit = _hittest.GetHitFrame(line.ID); } if (framehit != -1) { using (changesync.AcquireWrite()) { _first_invalid_frame = Math.Min(framehit, _first_invalid_frame); } } }