public void loadYourself(SmallFarmSave input) { createdFromLoad = true; level = input.level; weedPerUpdate = input.weedPerUpdate; totalWeedFarmed = input.totalWeedFarmed; gameObject.transform.position = new Vector3(input.farmPosition[0],input.farmPosition[1],input.farmPosition[2]); gameObject.transform.parent = GameObject.FindGameObjectWithTag("MainGameObjects").transform; }
public SmallFarmSave saveYourself() { SmallFarmSave test = new SmallFarmSave(); test.farmPosition = new List<float>(); test.farmPosition.Add(transform.position.x); test.farmPosition.Add(transform.position.y); test.farmPosition.Add(transform.position.z); test.level = level; test.weedPerUpdate = weedPerUpdate; test.totalWeedFarmed = totalWeedFarmed; return test; }