public ControlsData(ControlsSerialize controlsSave) { MoveLeft = controlsSave._moveLeft; MoveRight = controlsSave._moveRight; Jump = controlsSave._jump; ShootLemon = controlsSave._shootLemon; Pause = controlsSave._pause; }
public static void SaveControlsData(ControlsSerialize controlsSave) { BinaryFormatter bf = new BinaryFormatter(); FileStream stream = new FileStream(Application.persistentDataPath + "/controlsfile.citrus", FileMode.Create); ControlsData data = new ControlsData(controlsSave); bf.Serialize(stream, data); stream.Close(); }
// Start is called before the first frame update void Start() { buildStruct = new ControlsSerialize(); SaveButton.interactable = false; }