IEnumerator FollowObjectUpdate()
 {
     while (m_IsFollowing)
     {
         if (IsObjectValid(m_ObjectToFollow))
         {
             m_Camera.TransformTo(m_ObjectToFollow.transform);
             yield return(null);
         }
         else
         {
             m_IsFollowing = false;
             Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.FollowUser, null));
         }
     }
 }
示例#2
0
 IEnumerator FollowObjectUpdate()
 {
     while (m_IsFollowingGetter.GetValue())
     {
         if (IsObjectValid(m_UserObjectGetter.GetValue()))
         {
             m_Camera.TransformTo(m_UserObjectGetter.GetValue().transform);
             yield return(null);
         }
         else
         {
             var followUserData = new FollowUserAction.FollowUserData();
             followUserData.matchmakerId = "";
             followUserData.visualRepresentationGameObject = null;
             Dispatcher.Dispatch(FollowUserAction.From(followUserData));
         }
     }
 }