Exemple #1
0
 public void RemoveProperty(WorldProperty goal)
 {
     if (myGoals.ContainsKey(goal.type))
     {
         myGoals.Remove(goal.type);
     }
 }
Exemple #2
0
 public void AddProperty(WorldProperty goal)
 {
     if (!myGoals.ContainsKey(goal.type))
     {
         myGoals.Add(goal.type, goal);
     }
 }
Exemple #3
0
        public static bool CreateWorldPropertyAsset(WorldProperty property, string fileName)
        {
            if (!fileName.EndsWith(".asset"))
            {
                fileName += ".asset";
            }

            if (DoesAssetExist(fileName, WorldPropertyPath))
            {
                Debug.LogErrorFormat("Already created asset with name {0}", fileName);
                return(false);
            }

            WorldPropertyScriptable scriptable = ScriptableObject.CreateInstance <WorldPropertyScriptable>();

            scriptable.FromRuntimeProperty(property, true);

            AssetDatabase.CreateAsset(scriptable, string.Format("{0}/{1}", WorldPropertyPath, fileName));

            NarrativeDictionary.GetAsset().AddWorldProperty(scriptable);
            return(true);
        }
Exemple #4
0
 set => SetValue(WorldProperty, value);
Exemple #5
0
 // Use this for initialization
 void Start()
 {
     worldProperty        = new WorldProperty();
     worldProperty.iValue = thirstStart;
 }
Exemple #6
0
 // Use this for initialization
 void Start()
 {
     worldProperty        = new WorldProperty();
     worldProperty.iValue = hungerStart;
 }