import GameView from "./GameView";
import { injectProps } from "../props";

import TestView from './TestView'


export class GameWrapper extends engine.Container{
	private _gameView:GameView
	
	private _testView:TestView

    constructor(){
        super();
        engine.globalEvent.addEventListener('pictures-start', this.start, this);
		engine.globalEvent.addEventListener('pictures-stop', this.stop, this);

		//创建实例
		// let gameView = this._gameView = new GameView();
		// this.addChild(gameView);

		let testView = this._testView = new TestView();
		this.addChild(testView);
    }

    // start(event: engine.Event) {
	// 	injectProps(event.data);

	// 	// this._status = 1;

	// 	this._gameView.start();
	// }
	// stop(event: engine.Event) {
		
	// 	this._gameView.stop();
	// }


	start(event: engine.Event) {
		injectProps(event.data);

		// this._status = 1;

		///this._testView.start();
	}
	stop(event: engine.Event) {
		//this._testView.stop();
	}
}