home *** CD-ROM | disk | FTP | other *** search
- class illusoft.Gate
- {
- var dmc;
- var rec;
- var buttonSwitch;
- var isOpen = false;
- function Gate(mc, rec)
- {
- this.dmc = mc;
- this.rec = rec;
- }
- function SetSwitch(buttonSwitch)
- {
- this.buttonSwitch = buttonSwitch;
- }
- function GetSwitch()
- {
- return this.buttonSwitch;
- }
- function Open()
- {
- if(!this.isOpen)
- {
- this.rec.setActiveState(false);
- this.rec.setVisible(false);
- this.dmc.play();
- this.isOpen = true;
- }
- }
- }
-