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();
    }
Exemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     buildStruct             = new ControlsSerialize();
     SaveButton.interactable = false;
 }