Пример #1
0
	void UserLost(UserLostEventArgs e)
	{
		
		GameObject obj = userObjMap[e.ID];
		userObjMap.Remove(e.ID);
		Destroy(obj);
	}
Пример #2
0
		void FUserGenerator_LostUser(object sender, UserLostEventArgs e)
		{
			lock (FLockUserData)
				if (FUserData.ContainsKey(e.ID))
					FUserData.Remove(e.ID);
		}
        void userGenerator_LostUser(object sender, UserLostEventArgs e)
        {
            lock (userReleaseLock)
            {
                if (this.users.ContainsKey(e.ID))
                {
                    User user = null;
                    user = this.users[e.ID];
                    Console.WriteLine("Lost user: " + e.ID);
                    releaseUserTouches(e.ID);
                    this.users.Remove(e.ID);

                    if (user != null)
                    {
                        user.Dispose();
                    }
                }
            }
        }
Пример #4
0
 /// @brief callback for updating structures when a user is lost
 /// 
 /// This callback is called when a user is lost. It removes the user from all structures...
 /// @param sender who called the callback
 /// @param e the arguments of the event.
 private void LostUserCallback(object sender, UserLostEventArgs e)
 {
     for (int i = 0; i < m_poseDetectionCounter.Count; i++)
     {
         if(m_poseDetectionCounter[i].m_usedID != e.ID)
             continue; // irrelevant;
         m_poseDetectionCounter[i] = m_poseDetectionCounter[m_poseDetectionCounter.Count - 1];
         m_poseDetectionCounter.RemoveAt(m_poseDetectionCounter.Count - 1);
         i--;
     }
 }
Пример #5
0
 void userGenerator_LostUser(object sender, UserLostEventArgs e)
 {
     int id = e.ID;
     if (joints.ContainsKey(id))
     {
         this.joints.Remove(id);
         DestroyHandSession(id * 2);
         DestroyHandSession(id * 2 + 1);
     }
     OnUserLost(id);
 }
Пример #6
0
    void userGenerator_LostUser(object sender, UserLostEventArgs e)
    {
        allUsers.Remove(e.ID);
		SendMessage("UserLost", e, SendMessageOptions.DontRequireReceiver);
		
        if (calibratedUsers.Contains(e.ID))
        {
            calibratedUsers.Remove(e.ID);
			if (calibratedUsers.Count == 0)
			{
				SendMessage("CalibratedUserLost", e, SendMessageOptions.DontRequireReceiver);
			}
        }
		if (calibratingUsers.Contains(e.ID))
		{
			calibratingUsers.Remove(e.ID);
		}

		if (allUsers.Count == 0)
		{			
			SendMessage("AllUsersLost", e, SendMessageOptions.DontRequireReceiver);
		}


        if (AttemptToCalibrate)
        {
            AttemptCalibrationForAllUsers();
        }
    }
 private void LostUser(object sender, UserLostEventArgs e)
 {
     if (trackingUserId == e.ID)
         trackingUser = false;
     Console.Write(e.ID + " Lost user");
 }
Пример #8
0
 void _user_generator_LostUser(object sender, UserLostEventArgs e)
 {
     _joints.Remove(e.ID);
     _joint_orientation.Remove(e.ID);
     Console.WriteLine("Lost user " + e.ID);
 }
 // ユーザー消失
 void user_LostUser(object sender, UserLostEventArgs e)
 {
     message = "ユーザー消失:" + e.ID;
 }
Пример #10
0
    void userGenerator_LostUser(object sender, UserLostEventArgs e)
    {
        allUsers.Remove(e.ID);
        if (calibratedUsers.Contains(e.ID))
        {
            calibratedUsers.Remove(e.ID);
        }
        if (calibratingUsers.Contains(e.ID))
        {
            calibratingUsers.Remove(e.ID);
        }

        if (AttemptToCalibrate)
        {
            AttemptCalibrationForAllUsers();
        }
    }
Пример #11
0
 void userGenerator_LostUser(object sender, UserLostEventArgs e)
 {
     this.contador=0;
 }
Пример #12
0
 void userGenerator_LostUser(object sender, UserLostEventArgs e)
 {
     if(FSkeletonCapability.IsTracking(e.ID)) FSkeletonCapability.StopTracking(e.ID);
     FJoints.Remove(e.ID);
 }
Пример #13
0
 void _userGenerator_LostUser(object sender, UserLostEventArgs e)
 {
     if (LostUser != null)
         LostUser(this, e);
 }
Пример #14
0
 void HandleUserGeneratorLostUser(object sender, UserLostEventArgs ul)
 {
     HUD.text =  (HUD.text + "\nLost User: " + ul.ID);
     needsCalibration = true;
     //     this.joints.Remove(id);
 }
Пример #15
0
 /// <summary>
 /// Function that is called whenever a user is lost, most likely because it left the range of the Kinect for a while. 
 /// It removes the user from the tracked users and corrects the nr. of players
 /// </summary>
 /// <param name="sender">The object that called this function</param>
 /// <param name="e">The events associated with this call; used to retrieve the users id</param>
 private void OnLostUser(object sender, UserLostEventArgs e)
 {
     if (TrackedUsers.ContainsKey(e.ID))
     {
         TrackedUsers.Remove(e.ID);
         int nr = TrackedUsers.Where(u => u.Value.Active).Count();
         StateManager.Instance.NumberOfPlayers = nr;
     }
     Logger.Log("Lost user: " + e.ID);
 }
Пример #16
0
 /// @brief callback for updating structures when a user is lost
 /// 
 /// This callback is called when a user is lost. It removes the user from all structures...
 /// @param sender who called the callback
 /// @param e the arguments of the event.
 private void LostUserCallback(object sender, UserLostEventArgs e)
 {
     m_contextManager.Log("Lost user, userID=" + e.ID, NIEventLogger.Categories.Callbacks, NIEventLogger.Sources.Skeleton, NIEventLogger.VerboseLevel.Verbose);
     RemoveUser(e.ID);
 }
Пример #17
0
        void _UserGenerator_LostUser(object sender, UserLostEventArgs e)
        {
            KinectUser user = _FindUser(e.ID);

            _PoseDetectionCapability.StopPoseDetection(e.ID);

            lock (_UserLock)
            {
                if (this.Users.ContainsKey(e.ID))
                {
                    this.Users.Remove(e.ID);
                }
            }

            if (user != null)
            {
                UserLost.Raise(this, user);
            }
        }
 void userGenerator_LostUser(object sender, UserLostEventArgs e)
 {
     this.joints.Remove(e.ID);
 }
Пример #19
0
 void userGenerator_LostUser(object sender, UserLostEventArgs e)
 {
 }