Exemplo n.º 1
0
        private GameObject _InsSceneView(int viewId, string prefabPath, Vector3 pos, Quaternion rot,
                                         object[] customData)
        {
            GameObject ins  = RoomClient.InstantiateFunc(prefabPath, pos, rot);
            RoomView   view = ins.GetComponent <RoomView>();

            if (view == null)
            {
                throw new Exception(prefabPath + " don't hava a RoomPlayerView component");
            }
            view.Room           = this.Room;
            view.OwnerId        = 0;     //scene view
            view.ViewIdInPlayer = viewId;
            this.Room.Views.Add(view.Id, view);
            view.OnInstantiate(customData);
            return(ins);
        }
Exemplo n.º 2
0
 public ToRoomClient(RoomClient roomClient) : base(CommandExecuteMode.Manual)
 {
     this.RoomClient = roomClient;
 }