Пример #1
0
    private void init()
    {
        _curTime = 0;
        // 动态加载资源
        if (!ResourcesSaveUtils.getInstance().isLoaded)
        {
            // 开启协程,异步执行数据内容(并不是异步)
            StartCoroutine(ResourcesSaveUtils.getInstance().loadSpriteResources());
        }

        // init audio
        AudioPlayCtrl.init(audioManager);
        StartSceneAudioCtrl.init(audioManager);
        // repeat play audio
        GestureCtrl.getInstance().toLeftGesture   = playSystemAudio;
        GestureCtrl.getInstance().toCenterGesture = makeSure;
        GestureCtrl.getInstance().toRightGesture  = null;
        GestureCtrl.getInstance().toBackGesture   = () => {
            changeChoice(false);
        };
        GestureCtrl.getInstance().toFrontGesture = () => {
            changeChoice(true);
        };
        bindingUIFeature();
        GameManagerGlobalData.resetGameGlobalData();
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        CanvasCtrl.adjustCanvasScale(canvas);
        LoadingSceneAudioCtrl.init(audioManager);
        AudioPlayCtrl.init(audioManager);
        LoadingSceneAudioCtrl.getInstance().play(LOADING_TIPS);
        GestureCtrl.removeInstance();

        fillBar.fillAmount  = 0;
        fillEyes.fillAmount = 0;
        StartCoroutine(LoadMainScene());
    }
Пример #3
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;
        }
    }