
import Sprite3D = Laya.Sprite3D;
import PlayerBehaviour from "../Behaviour/PlayerBehaviour";
export class PlayerController {
    private static instance: PlayerController;
    public static get Instance(): PlayerController {
        return PlayerController.instance || (PlayerController.instance = new PlayerController());
    }

    public player: Sprite3D;
    public Init(_p: Sprite3D) {
        if (_p) {
            this.player = _p;
            var _pb = this.player.getChildAt(0).getComponent(PlayerBehaviour);
            if (!_pb) _pb = this.player.addComponent(PlayerBehaviour);
            _pb.init();
        }
    }
}