Rev | Line | |
---|
[2236] | 1 | ///////////////////////////////////////////////////////////////////////////////
|
---|
| 2 | //
|
---|
| 3 | // ## ######
|
---|
| 4 | // ###### ###
|
---|
| 5 | // ## ############### Shark 3D Engine (www.shark3d.com)
|
---|
| 6 | // ########## # # #
|
---|
| 7 | // ######## Copyright (c) 1996-2006 Spinor GmbH.
|
---|
| 8 | // ######### # # # All rights reserved.
|
---|
| 9 | // ## ##########
|
---|
| 10 | // ##
|
---|
| 11 | //
|
---|
| 12 | ///////////////////////////////////////////////////////////////////////////////
|
---|
| 13 |
|
---|
| 14 | var actor m_actu;
|
---|
| 15 | var actor m_speaker;
|
---|
| 16 |
|
---|
| 17 | func public void initActor()
|
---|
| 18 | m_actu = findActor( getParamStr( "actu" ) );
|
---|
| 19 | m_speaker = findActor( getParamStr( "speaker" ) );
|
---|
| 20 | end
|
---|
| 21 |
|
---|
| 22 | func public void finishActor()
|
---|
| 23 | end
|
---|
| 24 |
|
---|
| 25 | func public void player_enter( actor sender )
|
---|
| 26 | m_actu ^ play_to_end();
|
---|
| 27 | m_speaker ^ start();
|
---|
| 28 | var float duration = m_actu ^ float get_duration();
|
---|
| 29 | evtAppoint( "soundOff", duration );
|
---|
| 30 | end
|
---|
| 31 |
|
---|
| 32 | func public void player_leave( actor sender )
|
---|
| 33 | m_actu ^ play_to_start();
|
---|
| 34 | m_speaker ^ start();
|
---|
| 35 | var float duration = m_actu ^ float get_duration();
|
---|
| 36 | evtAppoint( "soundOff", duration );
|
---|
| 37 | end
|
---|
| 38 |
|
---|
| 39 | func public void soundOff()
|
---|
| 40 | m_speaker ^ stop();
|
---|
| 41 | end
|
---|
| 42 |
|
---|
| 43 | ///////////////////////////////////////////////////////////////////////////////
|
---|
Note: See
TracBrowser
for help on using the repository browser.