コード例 #1
0
        public UnlockData(UnlockManager unlock)
        {
            u_sorter       = unlock.u_sorter;
            u_clayProducer = unlock.u_clayProducer;
            u_eyeMaker     = unlock.u_eyeMaker;
            u_mouthMaker   = unlock.u_mouthMaker;
            u_legMaker     = unlock.u_legMaker;
            u_armMaker     = unlock.u_armMaker;

            level = unlock.level;
        }
コード例 #2
0
        public static void SaveUnlocks(UnlockManager unlock)
        {
            BinaryFormatter formatter = new BinaryFormatter();
            string          path      = Application.persistentDataPath + "/unlocks.save";
            FileStream      stream    = new FileStream(path, FileMode.Create);

            UnlockData data = new UnlockData(unlock);

            formatter.Serialize(stream, data);
            stream.Close();
        }
コード例 #3
0
        private void Awake()
        {
            if (unlocks == null)
            {
                unlocks = this;

                FirstTimeSetup();
            }
            else
            {
                Destroy(this.gameObject);
            }
        }