From e1e781bb2135ef78592226f1a3eaba4925702f1f Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 3 May 2021 16:38:41 -0700 Subject: :star: --- NET/worlds/console/Escalator.java | 105 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 NET/worlds/console/Escalator.java (limited to 'NET/worlds/console/Escalator.java') 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 -- cgit v1.2.3