示例#1
0
 // Use this for initialization
 void Start()
 {
     mSetup    = (missionSetup)gm.GetComponent("missionSetup");       //指定取得指定物件的指定腳本missionSetup裡的變數,該腳本的變數不用宣告為靜態(static)變數
     gateNowHp = mSetup.initialGateHp;
     showGateHpGuitext.text = showGateHpString + gateNowHp.ToString() + "/" + mSetup.initialGateHp.ToString();
     repairRang             = mSetup.repairGateRang;
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     mSetup = (missionSetup) gm.GetComponent("missionSetup"); //指定取得指定物件的指定腳本missionSetup裡的變數,該腳本的變數不用宣告為靜態(static)變數
     gateNowHp = mSetup.initialGateHp;
     showGateHpGuitext.text = showGateHpString+gateNowHp.ToString()+"/"+mSetup.initialGateHp.ToString();
     repairRang = mSetup.repairGateRang;
 }
示例#3
0
 // Use this for initialization
 void Start()
 {
     mSetup = (missionSetup) gameObject.GetComponent("missionSetup"); //指定取得指定物件的指定腳本missionSetup裡的變數,該腳本的變數不用宣告為靜態(static)變數
     if(!mSetup.useShakePhone)
     {
         showShakePhoneStaticGuitext.text = "不使用搖晃功能";
     }
 }
示例#4
0
 // Use this for initialization
 void Start()
 {
     mSetup = (missionSetup)gameObject.GetComponent("missionSetup");          //指定取得指定物件的指定腳本missionSetup裡的變數,該腳本的變數不用宣告為靜態(static)變數
     if (!mSetup.useShakePhone)
     {
         showShakePhoneStaticGuitext.text = "不使用搖晃功能";
     }
 }
 void Start()
 {
     audio.clip = Microphone.Start(null, true, 10, 44100); //開始從麥克風錄音
     audio.loop = true; // Set the AudioClip to loop 用於不斷撥放錄製重複撥放從麥克風錄下的內容,這樣才能不斷抓取麥克風路的音訊內容
     audio.mute = true; // Mute the sound, we don't want the player to hear it 播放錄音內容但是不用給玩家聽到
     while (!(Microphone.GetPosition("Android audio input") > 0)){} // Wait until the recording has started
     audio.Play(); // Play the audio source!
     mSetup = (missionSetup) gameObject.GetComponent("missionSetup"); //指定取得指定物件的指定腳本missionSetup裡的變數,該腳本的變數不用宣告為靜態(static)變數
     if(!mSetup.useShakePhone)
     {
         showSoundStatic.text = "不使用麥克風功能";
     }
 }
 void Start()
 {
     audio.clip = Microphone.Start(null, true, 10, 44100); //開始從麥克風錄音
     audio.loop = true;                                    // Set the AudioClip to loop 用於不斷撥放錄製重複撥放從麥克風錄下的內容,這樣才能不斷抓取麥克風路的音訊內容
     audio.mute = true;                                    // Mute the sound, we don't want the player to hear it 播放錄音內容但是不用給玩家聽到
     while (!(Microphone.GetPosition("Android audio input") > 0))
     {
     }                                                               // Wait until the recording has started
     audio.Play();                                                   // Play the audio source!
     mSetup = (missionSetup)gameObject.GetComponent("missionSetup"); //指定取得指定物件的指定腳本missionSetup裡的變數,該腳本的變數不用宣告為靜態(static)變數
     if (!mSetup.useShakePhone)
     {
         showSoundStatic.text = "不使用麥克風功能";
     }
 }
示例#7
0
 // Use this for initialization
 void Start()
 {
     mSetup           = (missionSetup)gm.GetComponent("missionSetup"); //指定取得指定物件的指定腳本missionSetup裡的變數,該腳本的變數不用宣告為靜態(static)變數
     blood            = mSetup.initialPlayerHp;
     guitextLife.text = "Life:" + blood.ToString();
 }
示例#8
0
 // Use this for initialization
 void Start()
 {
     mSetup = (missionSetup) gm.GetComponent("missionSetup"); //指定取得指定物件的指定腳本missionSetup裡的變數,該腳本的變數不用宣告為靜態(static)變數
     blood = mSetup.initialPlayerHp;
     guitextLife.text = "Life:" +blood.ToString();
 }