doors.nas 512 B

123456789101112131415161718192021222324252627282930
  1. # =====
  2. # Doors
  3. # =====
  4. Doors = {};
  5. Doors.new = func {
  6. obj = { parents : [Doors],
  7. crew : aircraft.door.new("instrumentation/doors/crew", 8.0),
  8. passenger : aircraft.door.new("instrumentation/doors/passenger", 10.0)
  9. };
  10. return obj;
  11. };
  12. Doors.crewexport = func {
  13. me.crew.toggle();
  14. }
  15. Doors.passengerexport = func {
  16. me.passenger.toggle();
  17. }
  18. # ==============
  19. # Initialization
  20. # ==============
  21. # objects must be here, otherwise local to init()
  22. doorsystem = Doors.new();