Пример #1
0
        public void LoadBehavior(BehaviorSaveData behaviorSaveData)
        {
            //Debug.Log("QuestLog.LoadQuest(" + questSaveData.MyName + ")");

            BehaviorProfile behaviorProfile = GetResource(behaviorSaveData.MyName);

            if (behaviorProfile != null)
            {
                behaviorProfile.Completed = behaviorSaveData.completed;
            }
        }
Пример #2
0
 public BehaviorProfile GetNewResource(string resourceName)
 {
     //Debug.Log(this.GetType().Name + ".GetResource(" + resourceName + ")");
     if (!RequestIsEmpty(resourceName))
     {
         string keyName = prepareStringForMatch(resourceName);
         if (resourceList.ContainsKey(keyName))
         {
             BehaviorProfile returnValue = ScriptableObject.Instantiate(resourceList[keyName]) as BehaviorProfile;
             returnValue.SetupScriptableObjects();
             return(returnValue);
         }
     }
     return(null);
 }