
import Sprite3D=Laya.Sprite3D;
import { Player } from "./Player";
import Vector3=Laya.Vector3;
export class RoleController {
    private static instasnce: RoleController;
    public static get Instance(): RoleController {
        return this.instasnce || (this.instasnce = new RoleController());
    }


    public player:Sprite3D;
    public playerS:Player;
    public init(role:Sprite3D){
        if(role){
            this.player=role;
            this.playerS=this.player.addComponent(Player);
        }
    }
    public CreateRay(){
        if(this.playerS)this.playerS.CreateRay();
    }
    public RoleRotation(rota:Vector3){
        if(this.playerS)this.playerS.RotationSelf(rota);
    }
}