public void Load(ShuttleSerializer ss) { volume = ss.volume; cost = ss.cost; fuelCapacity = ss.fuelCapacity; fuelReserves = ss.fuelReserves; condition = ss.condition; ID = ss.ID; status = ss.status; name = ss.name; transform.position = new Vector3(ss.xpos, ss.ypos, ss.zpos); transform.rotation = new Quaternion(ss.xrotation, ss.yrotation, ss.zrotation, ss.wrotation); }
public ShuttleSerializer Save() { ShuttleSerializer ss = new ShuttleSerializer(); ss.volume = volume; ss.cost = cost; ss.fuelReserves = fuelReserves; ss.fuelCapacity = fuelCapacity; ss.condition = condition; ss.ID = ID; ss.status = status; ss.name = name; ss.xpos = transform.position.x; ss.ypos = transform.position.y; ss.zpos = transform.position.z; ss.xrotation = transform.rotation.x; ss.yrotation = transform.rotation.y; ss.zrotation = transform.rotation.z; ss.wrotation = transform.rotation.w; return(ss); }