private void GhostAnimationCoplete(AbstractGhost ghost, double time) { if (_pathIndex == 0)//ExitPoint { return; } var pacman = PacmanPosition?.Invoke(ghost); if (ghost.Path == null) { ghost.Dispose(); GC.Collect(); } if (_pathIndex < ghost.Path.Count) { MoveGost(ghost, ghost.Speed); } else { ghost.Behavior.Think(ghost, pacman); _pathIndex = 1; PointAnimationHelperNotify?.Invoke(ghost); } }
public Actions() { currentPosition = new PacmanPosition(); }