Critical parameters from trap-size scaling in systems of trapped particles