// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

import { _decorator, Component, Node, game, Game, log } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Test')
export class Test extends Component {
    onLoad(){
        game.on(Game.EVENT_HIDE, this._onGameHide, this);
        game.on(Game.EVENT_SHOW, this._onGameShow, this);
    }

    start () {
    }

    private _onGameHide(event: any) {
        log("[PersistView] _onGameHide");
        // gloAr.AudioManager.func_getInstance().func_pauseMusic();
    }

    private _onGameShow(event: any) {
        log("[PersistView] _onGameShow");
    }
}
