Beispiel #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();
 }
Beispiel #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;
        }
    }
 public static void init(GameObject manager)
 {
     _instance = manager.GetComponent <BackgroundAudioCtrl>();
 }