Esempio n. 1
0
        /// <Summary>
        /// Get executed flag list from event data.
        /// </Summary>
        void GetExecutedFlagList()
        {
            List <string> flagNameList = new List <string>();

            string dataType = "EventMasterData";

            string[] guidArray = MapEditorUtil.GetGuidArray(dataType);

            foreach (string guid in guidArray)
            {
                string          path      = AssetDatabase.GUIDToAssetPath(guid);
                EventMasterData eventData = AssetDatabase.LoadAssetAtPath <EventMasterData>(path);
                if (eventData == null)
                {
                    continue;
                }

                if (eventData.eventParts == null)
                {
                    continue;
                }
                foreach (AriadneEventParts parts in eventData.eventParts)
                {
                    if (parts == null)
                    {
                        continue;
                    }
                    if (parts.hasExecutedFlag && parts.executedFlagName != "")
                    {
                        flagNameList.Add(parts.executedFlagName);
                    }
                }
            }
            flagNames = flagNameList.ToArray();
        }
Esempio n. 2
0
        /// <Summary>
        /// Search floor map data in the project and set it to the list.
        /// </Summary>
        void SetFloorMapDataList()
        {
            floorMapDataList = new List <FloorMapMasterData>();

            string dataType = "FloorMapMasterData";

            string[] guidArray = MapEditorUtil.GetGuidArray(dataType);

            foreach (string guid in guidArray)
            {
                string             path      = AssetDatabase.GUIDToAssetPath(guid);
                FloorMapMasterData floorData = AssetDatabase.LoadAssetAtPath <FloorMapMasterData>(path);
                if (floorData == null)
                {
                    continue;
                }
                if (floorData.name != MapEditorUtil.tempFileName)
                {
                    floorMapDataList.Add(floorData);
                }
            }
        }
Esempio n. 3
0
        /// <Summary>
        /// Search event data in the project and set it to the list.
        /// </Summary>
        void SetEventMasterDataList()
        {
            eventDataList = new List <EventMasterData>();

            string dataType = "EventMasterData";

            string[] guidArray = MapEditorUtil.GetGuidArray(dataType);

            foreach (string guid in guidArray)
            {
                string          path      = AssetDatabase.GUIDToAssetPath(guid);
                EventMasterData eventData = AssetDatabase.LoadAssetAtPath <EventMasterData>(path);
                if (eventData == null)
                {
                    continue;
                }
                if (eventData.eventId > 0)
                {
                    eventDataList.Add(eventData);
                }
            }
        }
Esempio n. 4
0
        /// <Summary>
        /// Get an item list from item data.
        /// </Summary>
        void GetTreasureItemList()
        {
            List <int>    itemIdList   = new List <int>();
            List <string> itemNameList = new List <string>();

            string dataType = "ItemMasterData";

            string[] guidArray = MapEditorUtil.GetGuidArray(dataType);

            foreach (string guid in guidArray)
            {
                string         path     = AssetDatabase.GUIDToAssetPath(guid);
                ItemMasterData itemData = AssetDatabase.LoadAssetAtPath <ItemMasterData>(path);
                if (itemData == null)
                {
                    continue;
                }
                itemIdList.Add(itemData.itemId);
                itemNameList.Add(itemData.itemName);
            }
            itemIds   = itemIdList.ToArray();
            itemNames = itemNameList.ToArray();
        }