public static GenerateIntentStrings CreateInstance(LexiconIntent intent)
        {
            GenerateIntentStrings instance = CreateInstance <GenerateIntentStrings>();

            instance.intent = intent;
            return(instance);
        }
        public static UpdateActionPrefab CreateInstance(LexiconIntent intent)
        {
            UpdateActionPrefab instance = CreateInstance <UpdateActionPrefab>();

            instance.intent = intent;
            return(instance);
        }
示例#3
0
        public static GenerateActionScript CreateInstance(LexiconIntent intent)
        {
            GenerateActionScript instance = CreateInstance <GenerateActionScript>();

            instance.intent = intent;
            return(instance);
        }
示例#4
0
        public static ValidateIntent CreateInstance(LexiconIntent intent)
        {
            ValidateIntent instance = CreateInstance <ValidateIntent>();

            instance.intent = intent;
            return(instance);
        }
        public void SaveIntent(LexiconIntent intent)
        {
            //Debug.Log("SaveIntent");

            SyncQueue assetsQueue = ScriptableObject.CreateInstance <SyncQueue>();

            assetsQueue.Enqueue(ValidateIntent.CreateInstance(intent));
            assetsQueue.Enqueue(GenerateIntentStrings.CreateInstance(intent));
            assetsQueue.Process();

            generateAssetsQueues.Add(assetsQueue);
        }
        private List <LexiconIntent> GetAllIntents()
        {
            List <LexiconIntent> intents = new List <LexiconIntent>();

            string[] guids = AssetDatabase.FindAssets("t:Mixspace.Lexicon.LexiconIntent");
            foreach (string guid in guids)
            {
                string        path   = AssetDatabase.GUIDToAssetPath(guid);
                LexiconIntent intent = AssetDatabase.LoadAssetAtPath <LexiconIntent>(path);
                intents.Add(intent);
            }

            return(intents);
        }
        public void CreateDefaultAction(LexiconIntent intent)
        {
            //Debug.Log("CreateAction");

            SyncQueue assetsQueue = ScriptableObject.CreateInstance <SyncQueue>();

            assetsQueue.Enqueue(GenerateActionPrefab.CreateInstance(intent));
            assetsQueue.Enqueue(GenerateIntentStrings.CreateInstance(intent));
            assetsQueue.Enqueue(GenerateActionScript.CreateInstance(intent));
            assetsQueue.Enqueue(ReloadSyncAction.CreateInstance());
            assetsQueue.Enqueue(UpdateActionPrefab.CreateInstance(intent));

            assetsQueue.Process();

            generateAssetsQueues.Add(assetsQueue);
        }
示例#8
0
 public bool UsesIntent(LexiconIntent intent)
 {
     return(intents.Contains(intent));
 }