private bool UpdateCharacterPosition( RequestCache requestCache, out string result_code) { bool success; // Load the player into the cache Player player = requestCache.GetPlayer(m_current_room_key, m_character_id); // Save the updated player position back into the DB if (player != null) { player.Position = m_energy_tank.Position; result_code = SuccessMessages.GENERAL_SUCCESS; success = true; } else { result_code = ErrorMessages.CACHE_ERROR + "(Failed to update character position and energy)"; success = false; } return(success); }
private bool UpdateCharacterState( RequestCache requestCache, out string result_code) { bool success; // Update the players position to the new position in the room Player player = requestCache.GetPlayer(m_room.room_key, m_character_id); if (player != null) { player.Position.Set(m_energy_tank.Position); player.Angle = MathConstants.GetAngleForDirection(MathConstants.eDirection.down); player.Energy = m_current_character_energy + m_energy_tank_old_energy; result_code = SuccessMessages.GENERAL_SUCCESS; success = true; } else { result_code = ErrorMessages.CACHE_ERROR + "(Failed to update character position and energy)"; success = false; } return(success); }
private bool UpdateCharacterPosition( RequestCache requestCache, out string result_code) { bool success; // Update the players position to the new position in the new room Player player = requestCache.GetPlayer(m_current_room_key, m_character_id); if (player != null) { player.Position = m_target_position; player.Angle = m_target_angle; result_code = SuccessMessages.GENERAL_SUCCESS; success = true; } else { result_code = ErrorMessages.CACHE_ERROR + "(Failed to update character position)"; success = false; } return(success); }
private bool UpdateCharacterPosition( RequestCache requestCache, out string result_code) { bool success; // Load the player into the cache Player player = requestCache.GetPlayer(m_current_room_key, m_character_id); // Save the updated player position back into the DB if (player != null) { player.Position = m_energy_tank.Position; result_code = SuccessMessages.GENERAL_SUCCESS; success = true; } else { result_code = ErrorMessages.CACHE_ERROR + "(Failed to update character position and energy)"; success = false; } return success; }
private bool UpdateCharacterState( RequestCache requestCache, out string result_code) { bool success; // Update the players position to the new position in the room Player player = requestCache.GetPlayer(m_room.room_key, m_character_id); if (player != null) { player.Position.Set(m_energy_tank.Position); player.Angle = MathConstants.GetAngleForDirection(MathConstants.eDirection.down); player.Energy = m_current_character_energy + m_energy_tank_old_energy; result_code = SuccessMessages.GENERAL_SUCCESS; success = true; } else { result_code = ErrorMessages.CACHE_ERROR + "(Failed to update character position and energy)"; success = false; } return success; }
private bool UpdateCharacterPosition( RequestCache requestCache, out string result_code) { bool success; // Update the players position to the new position in the new room Player player = requestCache.GetPlayer(m_current_room_key, m_character_id); if (player != null) { player.Position= m_target_position; player.Angle = m_target_angle; result_code = SuccessMessages.GENERAL_SUCCESS; success = true; } else { result_code = ErrorMessages.CACHE_ERROR + "(Failed to update character position)"; success = false; } return success; }