Beispiel #1
0
    public void MainPlayerJoin(long guid, string name, ShitMan.Vector3 bornPos)
    {
        GameObject     go    = (GameObject)Object.Instantiate(Resources.Load("Prefabs/GamePlay/Player"));
        MainPlayerCtrl _ctrl = go.GetComponent <MainPlayerCtrl>();

        _ctrl.name = "MainPlayer_" + name;
        _ctrl.transform.position = MathHelper.TransplantToVector3(bornPos);
        _ctrl.playerName         = name;
        _ctrl.guid   = guid;
        _ctrl.radius = 0.5f;
        mainPlayer   = _ctrl;
    }
 public static Vector3 TransplantToVector3(ShitMan.Vector3 src)
 {
     return(new Vector3(src.x, src.y, src.z));
 }