示例#1
0
 public void ResetALL()
 {
     if (currRoomCloudAnc != null)
     {
         currRoomCloudAnc.clear();
         GameObject.Destroy(currRoomCloudAnc);
     }
     regedistRoomCloudAncSuccessEvent = null;
     regedistRoomCloudAncFailureEvent = null;
     LoadRoomCloudAncSuccessEvent     = null;
     LoadRoomCloudAncFailureEvent     = null;
     isRoommer   = false;
     CloudRoomID = -1;
 }
示例#2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="pAnchor"></param>
 public void LoadRoomCloudAnc(RoomCloudAncEvent pSuccessCall, RoomCloudAncEvent pFailureCall)
 {
     LoadRoomCloudAncSuccessEvent = pSuccessCall;
     LoadRoomCloudAncFailureEvent = pFailureCall;
     if (currRoomCloudAnc == null)
     {
         GameObject vAncObj = GameObject.Instantiate <GameObject>(prefabAncPrefab);
         currRoomCloudAnc = vAncObj.GetComponent <SenseAR_CloudAnchorProxy>();
     }
     if (currRoomCloudAnc.isCanCreatFromClient())
     {
         currRoomCloudAnc.ReBindSyncFromCloudSuccessEvent(LoadRoomCloudAncOver);
         currRoomCloudAnc.ReBindSyncFromCloudFailureEvent(LoadRoomCloudAncOver);
         RetStr vAncContentCloud = ARCloudClient.enterRoom(CloudRoomID);
         currRoomCloudAnc.ReaderFormCloud(vAncContentCloud);
     }
     else
     {
         NotifyLoadRoomCloudAncFailure();
     }
 }
示例#3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pAnchor"></param>
        public void RegisterRoomCloudAnc(Anchor pAnchor, RoomCloudAncEvent pSuccessCall, RoomCloudAncEvent pFailureCall)
        {
            regedistRoomCloudAncFailureEvent = pFailureCall;
            regedistRoomCloudAncSuccessEvent = pSuccessCall;

            if (currRoomCloudAnc == null)
            {
                GameObject vAncObj = GameObject.Instantiate <GameObject>(prefabAncPrefab);
                currRoomCloudAnc = vAncObj.GetComponent <SenseAR_CloudAnchorProxy>();
            }
            if (currRoomCloudAnc.isCanCreatFromClient())
            {
                currRoomCloudAnc.ReBindCloudCreateSuccessEvent(RegisterRoomCloudOver);
                currRoomCloudAnc.ReBindCloudCreateFailureEvent(RegisterRoomCloudOver);
                currRoomCloudAnc.CreatFromClient(pAnchor);
            }
            else
            {
                NotifyRegisterRoomCloudFailure();
            }
        }