summaryrefslogtreecommitdiff
path: root/NET/worlds/console/Escalator.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/console/Escalator.java')
-rw-r--r--NET/worlds/console/Escalator.java105
1 files changed, 105 insertions, 0 deletions
diff --git a/NET/worlds/console/Escalator.java b/NET/worlds/console/Escalator.java
new file mode 100644
index 0000000..52ceb19
--- /dev/null
+++ b/NET/worlds/console/Escalator.java
@@ -0,0 +1,105 @@
+/* */ package NET.worlds.console;
+/* */
+/* */ import NET.worlds.scape.Material;
+/* */ import NET.worlds.scape.Point3;
+/* */ import NET.worlds.scape.Point3Temp;
+/* */ import NET.worlds.scape.Portal;
+/* */ import NET.worlds.scape.Rect;
+/* */ import NET.worlds.scape.Room;
+/* */ import NET.worlds.scape.RoomEnvironment;
+/* */ import NET.worlds.scape.World;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class Escalator
+/* */ {
+/* */ public Portal bottom;
+/* */ public Portal top;
+/* */ private Room antelower;
+/* */ private Stair stairs;
+/* */ private Room anteupper;
+/* */
+/* */ public Escalator(World world, String name, float width, float length, float ascent, float height, float antelen, int numsteps, Material riser, Material tread, Material floor, Material left, Material right, Material head, Material ceiling, float traveltime)
+/* */ {
+/* 56 */ this.stairs = new Stair(world, name, width, length, ascent, ascent + height,
+/* 57 */ numsteps, riser, tread, left, right, head, ceiling);
+/* */
+/* 59 */ this.antelower = new Room(world, "antelower." + name);
+/* 60 */ RoomEnvironment lenv = this.antelower.getEnvironment();
+/* 61 */ lenv.add(new Rect(0.0F, 0.0F, 0.0F, 0.0F, antelen, height, left));
+/* 62 */ lenv.add(new Rect(width, antelen, 0.0F, width, 0.0F, height, right));
+/* 63 */ Portal bp = new Portal(0.0F, antelen, 0.0F, width, antelen, height)
+/* 64 */ .biconnect(this.stairs.bottom);
+/* 65 */ lenv.add(bp);
+/* 66 */ this.bottom = new Portal(width, 0.0F, 0.0F, 0.0F, 0.0F, height);
+/* 67 */ lenv.add(this.bottom);
+/* 68 */ lenv.add(Rect.floor(0.0F, 0.0F, 0.0F, width, antelen, floor));
+/* 69 */ lenv.add(Rect.ceiling(0.0F, 0.0F, height, width, antelen, ceiling));
+/* */
+/* 71 */ this.anteupper = new Room(world, "anteupper." + name);
+/* 72 */ RoomEnvironment uenv = this.anteupper.getEnvironment();
+/* 73 */ uenv.add(new Rect(0.0F, 0.0F, 0.0F, 0.0F, antelen, height, left));
+/* 74 */ uenv.add(new Rect(width, antelen, 0.0F, width, 0.0F, height, right));
+/* 75 */ Portal tp = new Portal(0.0F, antelen, 0.0F, width, antelen, height)
+/* 76 */ .biconnect(this.stairs.top);
+/* 77 */ uenv.add(tp);
+/* 78 */ this.top = new Portal(width, 0.0F, 0.0F, 0.0F, 0.0F, height);
+/* 79 */ uenv.add(this.top);
+/* 80 */ uenv.add(Rect.floor(0.0F, 0.0F, 0.0F, width, antelen, floor));
+/* 81 */ uenv.add(Rect.ceiling(0.0F, 0.0F, height, width, antelen, ceiling));
+/* */
+/* 83 */ CameraConveyor convup = new CameraConveyor(Point3Temp.make(0.0F, length /
+/* 84 */ traveltime, 0.0F));
+/* 85 */ CameraConveyor convdn = new CameraConveyor(new Point3(0.0F, -length /
+/* 86 */ traveltime, 0.0F));
+/* 87 */ bp.addHandler(new AddHandler(convup));
+/* 88 */ tp.addHandler(new AddHandler(convdn));
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 94 */ this.stairs.bottom.addHandler(new RemoveHandler(convup));
+/* 95 */ this.stairs.bottom.addHandler(new RemoveHandler(convdn));
+/* 96 */ this.stairs.top.addHandler(new RemoveHandler(convup));
+/* 97 */ this.stairs.top.addHandler(new RemoveHandler(convdn));
+/* */ }
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\Escalator.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file