doors.nas 843 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # =====
  2. # Doors
  3. # =====
  4. Doors = {};
  5. Doors.new = func {
  6. obj = { parents : [Doors],
  7. Lcrew : aircraft.door.new("instrumentation/doors/Lcrew", 8.0),
  8. Rcrew : aircraft.door.new("instrumentation/doors/Rcrew", 10.0),
  9. Lpassenger : aircraft.door.new("instrumentation/doors/Lpassenger", 10.0),
  10. Rpassenger : aircraft.door.new("instrumentation/doors/Rpassenger", 10.0)
  11. };
  12. return obj;
  13. };
  14. Doors.Lcrewexport = func {
  15. me.Lcrew.toggle();
  16. }
  17. Doors.Rcrewexport = func {
  18. me.Rcrew.toggle();
  19. }
  20. Doors.Lpassengerexport = func {
  21. me.Lpassenger.toggle();
  22. }
  23. Doors.Rpassengerexport = func {
  24. me.Rpassenger.toggle();
  25. }
  26. Doors.roofexport = func {
  27. me.roof.toggle();
  28. }
  29. # ==============
  30. # Initialization
  31. # ==============
  32. # objects must be here, otherwise local to init()
  33. doorsystem = Doors.new();