From cfb9b7d0a056a8e54b71238631324f4ccd1ee077 Mon Sep 17 00:00:00 2001 From: yugecin Date: Tue, 27 Sep 2016 19:22:08 +0200 Subject: [PATCH] add moverfactories --- .../movers/factories/CircleMoverFactory.java | 31 +++++++++++++++++ .../factories/HalfCircleMoverFactory.java | 31 +++++++++++++++++ .../factories/HalfEllipseMoverFactory.java | 31 +++++++++++++++++ .../factories/HalfLowEllipseMoverFactory.java | 33 +++++++++++++++++++ .../movers/factories/JumpMoverFactory.java | 31 +++++++++++++++++ .../movers/factories/LinearMoverFactory.java | 31 +++++++++++++++++ .../movers/factories/MoverFactory.java | 27 +++++++++++++++ .../factories/QuartCircleMoverFactory.java | 31 +++++++++++++++++ 8 files changed, 246 insertions(+) create mode 100644 src/yugecin/opsudance/movers/factories/CircleMoverFactory.java create mode 100644 src/yugecin/opsudance/movers/factories/HalfCircleMoverFactory.java create mode 100644 src/yugecin/opsudance/movers/factories/HalfEllipseMoverFactory.java create mode 100644 src/yugecin/opsudance/movers/factories/HalfLowEllipseMoverFactory.java create mode 100644 src/yugecin/opsudance/movers/factories/JumpMoverFactory.java create mode 100644 src/yugecin/opsudance/movers/factories/LinearMoverFactory.java create mode 100644 src/yugecin/opsudance/movers/factories/MoverFactory.java create mode 100644 src/yugecin/opsudance/movers/factories/QuartCircleMoverFactory.java diff --git a/src/yugecin/opsudance/movers/factories/CircleMoverFactory.java b/src/yugecin/opsudance/movers/factories/CircleMoverFactory.java new file mode 100644 index 00000000..393d95ec --- /dev/null +++ b/src/yugecin/opsudance/movers/factories/CircleMoverFactory.java @@ -0,0 +1,31 @@ +/* + * opsu!dance - fork of opsu! with cursordance auto + * Copyright (C) 2016 yugecin + * + * opsu!dance is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * opsu! is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with opsu!dance. If not, see . + */ +package yugecin.opsudance.movers.factories; + +import itdelatrisu.opsu.objects.GameObject; +import yugecin.opsudance.movers.CircleMover; +import yugecin.opsudance.movers.Mover; + +public class CircleMoverFactory implements MoverFactory { + + @Override + public Mover create(GameObject start, GameObject end, int dir) { + return new CircleMover(start, end, dir); + } + +} diff --git a/src/yugecin/opsudance/movers/factories/HalfCircleMoverFactory.java b/src/yugecin/opsudance/movers/factories/HalfCircleMoverFactory.java new file mode 100644 index 00000000..656e2f00 --- /dev/null +++ b/src/yugecin/opsudance/movers/factories/HalfCircleMoverFactory.java @@ -0,0 +1,31 @@ +/* + * opsu!dance - fork of opsu! with cursordance auto + * Copyright (C) 2016 yugecin + * + * opsu!dance is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * opsu! is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with opsu!dance. If not, see . + */ +package yugecin.opsudance.movers.factories; + +import itdelatrisu.opsu.objects.GameObject; +import yugecin.opsudance.movers.HalfCircleMover; +import yugecin.opsudance.movers.Mover; + +public class HalfCircleMoverFactory implements MoverFactory { + + @Override + public Mover create(GameObject start, GameObject end, int dir) { + return new HalfCircleMover(start, end, dir); + } + +} diff --git a/src/yugecin/opsudance/movers/factories/HalfEllipseMoverFactory.java b/src/yugecin/opsudance/movers/factories/HalfEllipseMoverFactory.java new file mode 100644 index 00000000..c1d4c970 --- /dev/null +++ b/src/yugecin/opsudance/movers/factories/HalfEllipseMoverFactory.java @@ -0,0 +1,31 @@ +/* + * opsu!dance - fork of opsu! with cursordance auto + * Copyright (C) 2016 yugecin + * + * opsu!dance is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * opsu! is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with opsu!dance. If not, see . + */ +package yugecin.opsudance.movers.factories; + +import itdelatrisu.opsu.objects.GameObject; +import yugecin.opsudance.movers.HalfEllipseMover; +import yugecin.opsudance.movers.Mover; + +public class HalfEllipseMoverFactory implements MoverFactory { + + @Override + public Mover create(GameObject start, GameObject end, int dir) { + return new HalfEllipseMover(start, end, dir); + } + +} diff --git a/src/yugecin/opsudance/movers/factories/HalfLowEllipseMoverFactory.java b/src/yugecin/opsudance/movers/factories/HalfLowEllipseMoverFactory.java new file mode 100644 index 00000000..f5c1a2f5 --- /dev/null +++ b/src/yugecin/opsudance/movers/factories/HalfLowEllipseMoverFactory.java @@ -0,0 +1,33 @@ +/* + * opsu!dance - fork of opsu! with cursordance auto + * Copyright (C) 2016 yugecin + * + * opsu!dance is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * opsu! is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with opsu!dance. If not, see . + */ +package yugecin.opsudance.movers.factories; + +import itdelatrisu.opsu.objects.GameObject; +import yugecin.opsudance.movers.HalfEllipseMover; +import yugecin.opsudance.movers.Mover; + +public class HalfLowEllipseMoverFactory implements MoverFactory { + + @Override + public Mover create(GameObject start, GameObject end, int dir) { + HalfEllipseMover m = new HalfEllipseMover(start, end, dir); + m.setMod(0.5d); + return m; + } + +} diff --git a/src/yugecin/opsudance/movers/factories/JumpMoverFactory.java b/src/yugecin/opsudance/movers/factories/JumpMoverFactory.java new file mode 100644 index 00000000..056d3236 --- /dev/null +++ b/src/yugecin/opsudance/movers/factories/JumpMoverFactory.java @@ -0,0 +1,31 @@ +/* + * opsu!dance - fork of opsu! with cursordance auto + * Copyright (C) 2016 yugecin + * + * opsu!dance is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * opsu! is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with opsu!dance. If not, see . + */ +package yugecin.opsudance.movers.factories; + +import itdelatrisu.opsu.objects.GameObject; +import yugecin.opsudance.movers.JumpMover; +import yugecin.opsudance.movers.Mover; + +public class JumpMoverFactory implements MoverFactory { + + @Override + public Mover create(GameObject start, GameObject end, int dir) { + return new JumpMover(start, end, dir); + } + +} diff --git a/src/yugecin/opsudance/movers/factories/LinearMoverFactory.java b/src/yugecin/opsudance/movers/factories/LinearMoverFactory.java new file mode 100644 index 00000000..717538e4 --- /dev/null +++ b/src/yugecin/opsudance/movers/factories/LinearMoverFactory.java @@ -0,0 +1,31 @@ +/* + * opsu!dance - fork of opsu! with cursordance auto + * Copyright (C) 2016 yugecin + * + * opsu!dance is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * opsu! is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with opsu!dance. If not, see . + */ +package yugecin.opsudance.movers.factories; + +import itdelatrisu.opsu.objects.GameObject; +import yugecin.opsudance.movers.LinearMover; +import yugecin.opsudance.movers.Mover; + +public class LinearMoverFactory implements MoverFactory { + + @Override + public Mover create(GameObject start, GameObject end, int dir) { + return new LinearMover(start, end, dir); + } + +} diff --git a/src/yugecin/opsudance/movers/factories/MoverFactory.java b/src/yugecin/opsudance/movers/factories/MoverFactory.java new file mode 100644 index 00000000..5c330750 --- /dev/null +++ b/src/yugecin/opsudance/movers/factories/MoverFactory.java @@ -0,0 +1,27 @@ +/* + * opsu!dance - fork of opsu! with cursordance auto + * Copyright (C) 2016 yugecin + * + * opsu!dance is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * opsu! is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with opsu!dance. If not, see . + */ +package yugecin.opsudance.movers.factories; + +import itdelatrisu.opsu.objects.GameObject; +import yugecin.opsudance.movers.Mover; + +public interface MoverFactory { + + Mover create(GameObject start, GameObject end, int dir); + +} diff --git a/src/yugecin/opsudance/movers/factories/QuartCircleMoverFactory.java b/src/yugecin/opsudance/movers/factories/QuartCircleMoverFactory.java new file mode 100644 index 00000000..aa51a87d --- /dev/null +++ b/src/yugecin/opsudance/movers/factories/QuartCircleMoverFactory.java @@ -0,0 +1,31 @@ +/* + * opsu!dance - fork of opsu! with cursordance auto + * Copyright (C) 2016 yugecin + * + * opsu!dance is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * opsu! is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with opsu!dance. If not, see . + */ +package yugecin.opsudance.movers.factories; + +import itdelatrisu.opsu.objects.GameObject; +import yugecin.opsudance.movers.Mover; +import yugecin.opsudance.movers.QuartCircleMover; + +public class QuartCircleMoverFactory implements MoverFactory { + + @Override + public Mover create(GameObject start, GameObject end, int dir) { + return new QuartCircleMover(start, end, dir); + } + +}