예제 #1
0
 // 游戏失败
 private void Failed()
 {
     Debug.Log("Game Over Failed!");
     // 手势监听,判断游戏结束后用户操作,但是由于目前策划功能不完善,所以这个部分默认是重新开始游戏
     BackgroundAudioCtrl.getInstance().play(BackgroundAudioData.GAME_OVER);
     BackgroundAudioCtrl.getInstance().play(BackgroundAudioData.NONE);
     PlayerAudioCtrl.getInstance().play(PlayerAudioData.RESTART_GAME_TIPS);
     switchGestureToGameOver();
 }
예제 #2
0
    // init audio
    private void initAudioCtrl()
    {
        AudioPlayCtrl.init(audioManager);
        PlayerAudioCtrl.init(audioManager);
        BackgroundAudioCtrl.init(audioManager);
        ObstacleAudioCtrl.init(audioManager);

        // close contain feature when in the runtime.
        if (PlatformUtils.isTouchUser())
        {
            isDevelop = false;
        }
    }
예제 #3
0
 public static void init(GameObject manager)
 {
     _instance = manager.GetComponent <BackgroundAudioCtrl>();
 }