import ResourceLoad from "../game_module/ResourceLoad";

import Scene3D = Laya.Scene3D;
import BulletController from "./BulletController";
import { RoleController } from "./RoleController";
export default class GameSceneController {
    private static instance: GameSceneController;
    public static get Instance(): GameSceneController {
        return this.instance || (this.instance = new GameSceneController());
    }


    public game_scene: Scene3D;
    public path = "res/LayaScene_main/Conventional/main.ls";
    public CreateScene() {
        ResourceLoad.LoadResource([this.path], () => {
            var t = Laya.loader.getRes(this.path) as Laya.Scene3D;
            Laya.stage.addChild(t);
            this.game_scene = t;
            var _bullet = t.getChildByName("bullet") as Laya.Sprite3D;
            BulletController.Instance.init(_bullet);
            var _role = t.getChildByName("role") as Laya.Sprite3D;
            RoleController.Instance.init(_role);
           
            RoleController.Instance.CreateRay();
        });
    }

}