C++ Reading Data in a File
You could add state to the reader: e.g. have a std::string variable target outside of the loop, read the lines in a while loop and...

while (getline(file, line)) {
  if (line=="enemy" || line=="player") {
    target=line; // remember where to put things
  }
  else {
    const std::string::size_type p=line.find(":");
    if (p!=std::string::npos) {
      assert(!target.empty());
      const std::string tag=line.substr(0, p);
      const std::string val=line.substr(p+1);

      // parse val (maybe with istringstream),
      // then put values into appropriate destination,
      // by using target and tag
    }
  }
}