Exemple #1
0
        public void save(EnKeyUnits keyId)
        {
            var id = ((int)keyId).ToString();

            PlayerPrefs.SetInt(id + ":type", (int)type);

            switch (type)
            {
            case EnDeviceType.axis: deviceAxis.save(id);  break;

            case EnDeviceType.key:  deviceKey.save(id);   break;
            }
        }
Exemple #2
0
        public void load(EnKeyUnits keyId)
        {
            var id = ((int)keyId).ToString();

            var typeId = id + ":type";

            if (!PlayerPrefs.HasKey(typeId))
            {
                return;
            }

            type = (EnDeviceType)PlayerPrefs.GetInt(typeId);

            switch (type)
            {
            case EnDeviceType.axis: deviceAxis.load(id);  break;

            case EnDeviceType.key:  deviceKey.load(id);   break;
            }
        }