doors.nas 778 B

123456789101112131415161718192021222324252627282930313233343536373839
  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", 8.0),
  9. parachute : aircraft.door.new("instrumentation/doors/parachute", 1.0),
  10. wings : aircraft.door.new("instrumentation/doors/wings", 1.0)
  11. };
  12. return obj;
  13. };
  14. Doors.crewexport = func {
  15. me.crew.toggle();
  16. }
  17. Doors.passengerexport = func {
  18. me.passenger.toggle();
  19. }
  20. Doors.parachuteexport = func {
  21. me.parachute.toggle();
  22. }
  23. Doors.wingsexport = func {
  24. me.wings.toggle();
  25. }
  26. # ==============
  27. # Initialization
  28. # ==============
  29. # objects must be here, otherwise local to init()
  30. doorsystem = Doors.new();