Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- note
- description: "Creating new objects for Zurich."
- class
- OBJECT_CREATION
- inherit
- ZURICH_OBJECTS
- feature -- Explore Zurich
- explore
- -- Create new objects for Zurich.
- do
- --creating first building
- create p1.make (300, 50)
- create p2.make (400, 0)
- create Hauptgebaeude.make ("Raemistrasse 101", p1, p2)
- --creating another building
- create p3.make (300, -1400)
- create p4.make (350, -1450)
- create Oper.make ("Opernstrasse 1", p3, p4)
- --creating some legs for a route, and linking them
- create leg1.make (Polyterrasse, Central, Polybahn)
- create leg2.make (Central, Zurich.station ("Paradeplatz"), Zurich.line (6))
- create leg3.make (Zurich.station ("Paradeplatz"), Zurich.station ("Opernhaus"), Zurich.line (2))
- create route1.make (leg1)
- route1.append_leg (leg2)
- route1.append_leg (leg3)
- --adding buildings and route to Zurich and displaying them on the map
- Zurich_map.animate
- Zurich.add_building (Hauptgebaeude)
- Zurich.add_building (Oper)
- Zurich.add_route (route1)
- end
- Hauptgebaeude, Oper: BUILDING
- p1, p2, p3, p4: VECTOR
- leg1, leg2, leg3: LEG
- route1: ROUTE
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement