예제 #1
0
        /// <summary>
        /// Restores a snapshot and overwrites the current skill tree values with it
        /// </summary>
        /// <param name="snapshot">Snapshot.</param>
        virtual public void LoadSnapshot(SaveSkillTree snapshot)
        {
            skillPoints = snapshot.skillPoints;

            foreach (SaveSkill s in snapshot.skills)
            {
                skillUuidLib[s.uuid].unlocked = s.unlocked;
            }

            foreach (SaveSkillCollection c in snapshot.collections)
            {
                collectionUuidLib[c.uuid].SkillIndex = c.skillIndex;
            }

            foreach (SaveSkillCategory c in snapshot.categories)
            {
                categoryUuidLib[c.uuid].skillLv = c.skillLv;
            }
        }
		/// <summary>
		/// Restores a snapshot and overwrites the current skill tree values with it
		/// </summary>
		/// <param name="snapshot">Snapshot.</param>
		virtual public void LoadSnapshot (SaveSkillTree snapshot) {
			skillPoints = snapshot.skillPoints;

			foreach (SaveSkill s in snapshot.skills) {
				skillUuidLib[s.uuid].unlocked = s.unlocked;
			}
			
			foreach (SaveSkillCollection c in snapshot.collections) {
				collectionUuidLib[c.uuid].SkillIndex = c.skillIndex;
			}

			foreach (SaveSkillCategory c in snapshot.categories) {
				categoryUuidLib[c.uuid].skillLv = c.skillLv;
			}
		}