public ItemEditor(GUISkin guiSkin, MainWindowEditor data) { EditorName = "Item"; Init(guiSkin, data); LoadData(); }
static void Init() { MainWindowEditor window = (MainWindowEditor)EditorWindow.GetWindow(typeof(MainWindowEditor)); window.autoRepaintOnSceneChange = false; window.Show(); }
public static void DisplayActivityComponents(NPCActivity activity, MainWindowEditor Data) { EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Button Text"); activity.npcButtonText = EditorGUILayout.TextField(activity.npcButtonText, GUILayout.Width(500)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("NPC Button Atlas Path"); activity.npcIconAtlas = EditorGUILayout.TextField(activity.npcIconAtlas, GUILayout.Width(500)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("NPC Button Sprite Name"); activity.npcIconSprite = EditorGUILayout.TextField(activity.npcIconSprite, GUILayout.Width(500)); EditorGUILayout.EndHorizontal(); EditorGUILayout.Separator(); activity.conversationID = EditorUtils.IntPopup(activity.conversationID, Data.conversationEditor.items, "conversationID: ", FieldTypeEnum.Middle); /*for (int i = 0; i < activity.conversationIDs.Count; i++) { EditorGUILayout.BeginHorizontal(); activity.conversationIDs[i] = EditorUtils.IntPopup(activity.conversationIDs[i], Data.conversationEditor.items, "conversationID: " + i, 90, FieldTypeEnum.Middle); if(GUILayout.Button("Remove conversation id", GUILayout.Width(400))) { activity.conversationIDs.Remove(activity.conversationIDs[i]); break; } EditorGUILayout.EndHorizontal(); } if(GUILayout.Button("Add Conversation ID", GUILayout.Width(400))) { activity.conversationIDs.Add(1); }*/ ConditionsUtils.Conditions(activity.Conditions, Data); EditorUtils.Separator(); }
public ArmorEditor(GUISkin guiSkin, MainWindowEditor data) { EditorName = "Armor"; Init(guiSkin, data); LoadData(); }
public MiniGameEditor(GUISkin guiSkin, MainWindowEditor data) { EditorName = "MiniGame"; Init(guiSkin, data); LoadData(); }
public NPCEditor(GUISkin guiSkin, MainWindowEditor data) { EditorName = "NPC"; Init(guiSkin, data); LoadData(); }
// Use this for initialization public CurrencyEditor(GUISkin guiSkin, MainWindowEditor data) { EditorName = "Currency"; Init(guiSkin, data); LoadData(); }
// Use this for initialization public BadgeEditor(GUISkin guiSkin, MainWindowEditor data) { EditorName = "Badges"; Init(guiSkin, data); LoadData(); }
public ServiceEditor(GUISkin guiSkin, MainWindowEditor data) { EditorName = "NPCService"; Init(guiSkin, data); LoadData(); }
protected void Init(GUISkin guiSkin, MainWindowEditor data) { skin = guiSkin; Data = data; searchedID = searchedString = string.Empty; LoadData(); }
public ShopEditor(GUISkin guiSkin, MainWindowEditor data) { EditorName = "Shop"; Init(guiSkin, data); LoadData(); }
public EnemyEditor(GUISkin guiSkin, MainWindowEditor data) { EditorName = "Enemy"; Init(guiSkin, data); LoadData(); }
public QuestEditor(GUISkin guiSkin, MainWindowEditor data) { EditorName = "Quests"; Init(guiSkin, data); LoadData(); }
// Use this for initialization public DanceMoveEditor(GUISkin guiSkin, MainWindowEditor data) { EditorName = "Dance"; Init(guiSkin, data); LoadData(); }
public TownEditor(GUISkin guiSkin, MainWindowEditor data) { EditorName = "Town"; Init(guiSkin, data); LoadData(); }
// Use this for initialization public ConstructionEditor(GUISkin guiSkin, MainWindowEditor data) { EditorName = "Constructions"; Init(guiSkin, data); LoadData(); }
public static void AddUsableItem(UsableItem usableItem, MainWindowEditor Data) { //usableItem.Recharge = EditorUtils.FloatField(usableItem.Recharge ,"Cooldown"); EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Cooldown type"); //usableItem.UsageSkill = (UsageSkillType)EditorGUILayout.EnumPopup(usableItem.UsageSkill ,GUILayout.Width(300)); EditorGUILayout.EndHorizontal(); EditorUtils.Separator(); EditorUtils.Label("Usable effects"); //EffectUtils.EffectsEditor(usableItem.Effects, Data); //ConditionsUtils.Conditions(usableItem.UseConditions, Data); }
public static void Conditions(List<Condition> Conditions, MainWindowEditor Data) { foreach(Condition condition in Conditions) { AddCondition(condition, Data); if (GUILayout.Button("Delete", GUILayout.Width(120))) { Conditions.Remove(condition); break; } EditorGUILayout.EndHorizontal(); } EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("Add condition",GUILayout.Width(120))) { Conditions.Add(new Condition()); } EditorGUILayout.EndHorizontal(); }
/*public static void AddItemCategory(RPGItemCategory itemCategoryID, List<RPGItemCategory> categories) * { * string[] names = new string[categories.Count]; * int[] ID = new int[categories.Count]; * int index = 0; * foreach(RPGItemCategory item in categories) * { * names[index] = item.Name; * ID[index] = item.ID; * index++; * } * * EditorGUILayout.Separator(); * EditorGUILayout.BeginHorizontal(); * * EditorGUILayout.PrefixLabel("Item category"); * itemCategoryID.ID = EditorGUILayout.IntPopup(itemCategoryID.ID, names, ID ,GUILayout.Width(300)); * }*/ public static void AddEquiped(Equiped equiped, MainWindowEditor Data) { EditorUtils.Separator(); equiped.FBXName = EditorUtils.TextField(equiped.FBXName, "FBX location"); EditorUtils.Label("Equiped slot"); //EffectUtils.EffectsEditor(equiped.WornEffects, Data, EffectTypeUsage.Equiped); //ConditionsUtils.Conditions(equiped.Conditions, Data); //equiped.Durability = EditorUtils.IntField(equiped.Durability, "Durability", 300, FieldTypeEnum.WholeLine); EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); equiped.EquipmentSlotIndex = (EquipmentSlots)EditorGUILayout.EnumPopup(equiped.EquipmentSlotIndex, GUILayout.Width(300)); /*if (GUILayout.Button("Add slot", GUILayout.Width(150))) * { * equiped.EquipmentSlots.Add(new RPGEquipmentSlot()); * } * EditorGUILayout.EndHorizontal();*/ /*foreach(RPGEquipmentSlot slot in equiped.EquipmentSlots) * { * AddEquipmentSlot(slot, Data.equipmentSlotEditor.Slots); * * if (GUILayout.Button("Delete", GUILayout.Width(150))) * { * equiped.EquipmentSlots.Remove(slot); * break; * } * EditorGUILayout.EndHorizontal(); * }*/ }
/*public static void AddItemCategory(RPGItemCategory itemCategoryID, List<RPGItemCategory> categories) { string[] names = new string[categories.Count]; int[] ID = new int[categories.Count]; int index = 0; foreach(RPGItemCategory item in categories) { names[index] = item.Name; ID[index] = item.ID; index++; } EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Item category"); itemCategoryID.ID = EditorGUILayout.IntPopup(itemCategoryID.ID, names, ID ,GUILayout.Width(300)); }*/ public static void AddEquiped(Equiped equiped, MainWindowEditor Data) { EditorUtils.Separator(); equiped.FBXName = EditorUtils.TextField(equiped.FBXName, "FBX location"); EditorUtils.Label("Equiped slot"); //EffectUtils.EffectsEditor(equiped.WornEffects, Data, EffectTypeUsage.Equiped); //ConditionsUtils.Conditions(equiped.Conditions, Data); //equiped.Durability = EditorUtils.IntField(equiped.Durability, "Durability", 300, FieldTypeEnum.WholeLine); EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); equiped.EquipmentSlotIndex = (EquipmentSlots)EditorGUILayout.EnumPopup(equiped.EquipmentSlotIndex ,GUILayout.Width(300)); /*if (GUILayout.Button("Add slot", GUILayout.Width(150))) { equiped.EquipmentSlots.Add(new RPGEquipmentSlot()); } EditorGUILayout.EndHorizontal();*/ /*foreach(RPGEquipmentSlot slot in equiped.EquipmentSlots) { AddEquipmentSlot(slot, Data.equipmentSlotEditor.Slots); if (GUILayout.Button("Delete", GUILayout.Width(150))) { equiped.EquipmentSlots.Remove(slot); break; } EditorGUILayout.EndHorizontal(); }*/ }
private static void AddCondition(Condition condition, MainWindowEditor D) { EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Condition type"); if (string.IsNullOrEmpty(condition.ItemToHave)) { condition.ItemToHave = string.Empty; } bool reloadList = false; ConditionTypeEnum temp = condition.ConditionType; temp = (ConditionTypeEnum)EditorGUILayout.EnumPopup(temp, GUILayout.Width(300)); if (temp != condition.ConditionType) { reloadList = true; condition.ConditionType = temp; } switch(condition.ConditionType) { /*case ConditionTypeEnum.AttributePoint: condition.ItemToHave = IntPopup(condition, D.attributeEditor.items, "Attribute", 150, reloadList); break; case ConditionTypeEnum.BaseAttribute: condition.ItemToHave = IntPopup(condition, D.attributeEditor.items, "Attribute", 150, reloadList); break; case ConditionTypeEnum.BaseSkill: condition.ItemToHave = IntPopup(condition, D.skillEditor.items, "Skill", 150, reloadList); break; case ConditionTypeEnum.ClassNotAllowed: condition.ItemToHave = IntPopup(condition, D.classEditor.items, "Class", 150, reloadList); break; case ConditionTypeEnum.ClassRequired: condition.ItemToHave = IntPopup(condition, D.enemyEditor.items, "Enemy", 150, reloadList); break;*/ case ConditionTypeEnum.CanBattle: condition.ItemToHave = "1"; break; case ConditionTypeEnum.KillTarget: condition.ItemToHave = IntPopup(condition, D.enemyEditor.items, "Enemy", 150, reloadList); break; case ConditionTypeEnum.CompletedQuestsCount: break; case ConditionTypeEnum.QuestCompleted: condition.ItemToHave = IntPopup(condition, D.questEditor.items, "Quest", 150, reloadList); break; case ConditionTypeEnum.QuestCanFinish: condition.ItemToHave = IntPopup(condition, D.questEditor.items, "Quest", 150, reloadList); break; case ConditionTypeEnum.QuestFinished: condition.ItemToHave = IntPopup(condition, D.questEditor.items, "Quest", 150, reloadList); break; case ConditionTypeEnum.QuestInProgress: condition.ItemToHave = IntPopup(condition, D.questEditor.items, "Quest", 150, reloadList); break; case ConditionTypeEnum.QuestNotStarted: condition.ItemToHave = IntPopup(condition, D.questEditor.items, "Quest", 150, reloadList); break; /*case ConditionTypeEnum.RaceNotAllowed: condition.ItemToHave = IntPopup(condition, D.raceEditor.items, "Race", 150, reloadList); break; case ConditionTypeEnum.RaceRequired: condition.ItemToHave = IntPopup(condition, D.raceEditor.items, "Race", 150, reloadList); break; case ConditionTypeEnum.SkillPoint: condition.ItemToHave = IntPopup(condition, D.skillEditor.items, "Skill", 150, reloadList); break;*/ case ConditionTypeEnum.SomeItemMustBeInInventory: EditorGUILayout.PrefixLabel(" Unique ID: "); condition.ItemToHave = EditorGUILayout.TextField(condition.ItemToHave, GUILayout.Width(100)); break; case ConditionTypeEnum.QuestStepInProgress: condition.AmountToReach = EditorUtils.IntField(condition.AmountToReach, "Step number", 40, FieldTypeEnum.Middle); condition.ItemToHave = IntPopup(condition, D.questEditor.items, "Quest", 150, reloadList); break; /*case ConditionTypeEnum.TotalAttribute: condition.ItemToHave = IntPopup(condition, D.attributeEditor.items, "Attribute", 150, reloadList); break; case ConditionTypeEnum.TotalSkill: condition.ItemToHave = IntPopup(condition, D.skillEditor.items, "Skill", 150, reloadList); break; case ConditionTypeEnum.QuestStepInProgress: condition.SecondaryID = EditorUtils.IntField(condition.SecondaryID, "Step number", 40, FieldTypeEnum.Middle); condition.ItemToHave = IntPopup(condition, D.questEditor.items, "Quest", 150, reloadList); break; case ConditionTypeEnum.AlternatedQuestCompleted: condition.SecondaryID = EditorUtils.IntField(condition.SecondaryID, "End ID", 40, FieldTypeEnum.Middle); condition.ItemToHave = IntPopup(condition, D.questEditor.items, "Quest", 150, reloadList); break; case ConditionTypeEnum.QuestFailed: condition.ItemToHave = IntPopup(condition, D.questEditor.items, "Quest", 150, reloadList); break; case ConditionTypeEnum.ReputationValue: condition.ItemToHave = IntPopup(condition, D.reputationEditor.items, "Reputation", 150, reloadList); break;*/ } EditorGUILayout.PrefixLabel(" amount: "); condition.AmountToReach = EditorGUILayout.IntField(condition.AmountToReach, GUILayout.Width(100)); }
/*public static void AddItemCategory(RPGItemCategory itemCategoryID, List<RPGItemCategory> categories) { string[] names = new string[categories.Count]; int[] ID = new int[categories.Count]; int index = 0; foreach(RPGItemCategory item in categories) { names[index] = item.Name; ID[index] = item.ID; index++; } EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Item category"); itemCategoryID.ID = EditorGUILayout.IntPopup(itemCategoryID.ID, names, ID ,GUILayout.Width(300)); }*/ public static void AddEquiped(Equiped equiped, MainWindowEditor Data) { EditorUtils.Separator(); for (int i = 0; i < equiped.FBXName.Count; i++) { EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel(" FBX location "); equiped.FBXName[i] = EditorUtils.TextField(equiped.FBXName[i], "fbxname"); //DisplayShopItem(item); if (GUILayout.Button("Delete", GUILayout.Width(200))) { equiped.FBXName.Remove(equiped.FBXName[i]); } EditorGUILayout.EndHorizontal(); } if (GUILayout.Button("Add fbx location", GUILayout.Width(200))) { equiped.FBXName.Add("Armor/"); } EditorUtils.Separator(); //EffectUtils.EffectsEditor(equiped.WornEffects, Data, EffectTypeUsage.Equiped); //ConditionsUtils.Conditions(equiped.Conditions, Data); //equiped.Durability = EditorUtils.IntField(equiped.Durability, "Durability", 300, FieldTypeEnum.WholeLine); //EditorGUILayout.Separator(); //EditorGUILayout.BeginHorizontal(); /*if (GUILayout.Button("Add slot", GUILayout.Width(150))) { equiped.EquipmentSlots.Add(new RPGEquipmentSlot()); } EditorGUILayout.EndHorizontal();*/ /*foreach(RPGEquipmentSlot slot in equiped.EquipmentSlots) { AddEquipmentSlot(slot, Data.equipmentSlotEditor.Slots); if (GUILayout.Button("Delete", GUILayout.Width(150))) { equiped.EquipmentSlots.Remove(slot); break; } EditorGUILayout.EndHorizontal(); }*/ }
public static void AddUsableItem(UsableItem usableItem, MainWindowEditor Data) { //usableItem.Recharge = EditorUtils.FloatField(usableItem.Recharge ,"Cooldown"); EditorGUILayout.Separator(); EditorUtils.Label("Usable effects"); //EffectUtils.EffectsEditor(usableItem.Effects, Data); //ConditionsUtils.Conditions(usableItem.UseConditions, Data); }
public static void DisplayEvent(ActionEvent action, MainWindowEditor data) { EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Action type"); action.ActionType = (ActionEventType)EditorGUILayout.EnumPopup(action.ActionType, GUILayout.Width(150)); switch(action.ActionType) { //end conversation case ActionEventType.EndConversation : break; case ActionEventType.HideSpeaker: break; case ActionEventType.TriggerNPCActivity: action.Item = EditorUtils.IntField(action.Item, "activity id", 90, FieldTypeEnum.Middle); break; case ActionEventType.TalkToNPC: action.Item = EditorUtils.IntField(action.Item, "npc id", 90, FieldTypeEnum.Middle); action.Amount = EditorUtils.IntField(action.Amount, "delay in secs", 90, FieldTypeEnum.Middle); break; //take item case ActionEventType.TakeItem: action.PreffixItem = (PreffixType)EditorGUILayout.EnumPopup(action.PreffixItem, GUILayout.Width(200)); switch (action.PreffixItem) { case PreffixType.ARMOR: action.Item = EditorUtils.IntPopup(action.Item, data.armorEditor.items, "Armor", 90, FieldTypeEnum.Middle); break; case PreffixType.ITEM: action.Item = EditorUtils.IntPopup(action.Item, data.itemEditor.items, "Item", 90, FieldTypeEnum.Middle); break; /*case PreffixType.QUEST: action.Item = EditorUtils.IntPopup(action.Item, data.questEditor.items, "Quest", 90, FieldTypeEnum.Middle); break; case PreffixType.WEAPON: action.Item = EditorUtils.IntPopup(action.Item, data.weaponEditor.items, "Weapon", 90, FieldTypeEnum.Middle); break; case PreffixType.SKILL: action.Item = EditorUtils.IntPopup(action.Item, data.skillEditor.items, "Skill", 90, FieldTypeEnum.Middle); break; case PreffixType.SPELL: action.Item = EditorUtils.IntPopup(action.Item, data.skillEditor.items, "Spell", 90, FieldTypeEnum.Middle); break; case PreffixType.REPUTATION: action.Item = EditorUtils.IntPopup(action.Item, data.reputationEditor.items, "Reputation", 90, FieldTypeEnum.Middle); break;*/ } action.Amount = EditorUtils.IntField(action.Amount, "Amount: ", 90, FieldTypeEnum.Middle); break; case ActionEventType.TakeQuestStepItemsTask: //quest start case ActionEventType.QuestStart: case ActionEventType.QuestFailed: case ActionEventType.DisplayQuestDetails: case ActionEventType.DisplayQuestInfo: case ActionEventType.DisplayQuestStatus: case ActionEventType.GiveQuestRewards: //quest end case ActionEventType.QuestEnd: action.Item = EditorUtils.IntPopup(action.Item, data.questEditor.items, "Quest", 90, FieldTypeEnum.Middle); break; case ActionEventType.Continueconversation: break; case ActionEventType.GoToParagraph: action.Item = EditorGUILayout.IntField( action.Item, GUILayout.Width(100)); break; } }
public static void DisplayItemPart(RPGItem item, MainWindowEditor Data) { if (string.IsNullOrEmpty(item.IconPath)) item.IconPath = string.Empty; if (string.IsNullOrEmpty(item.AtlasName)) item.AtlasName = string.Empty; //if (string.IsNullOrEmpty(item.PrefabName)) // item.PrefabName = string.Empty; //if (item.LevelItem == 0) // item.LevelItem = 1; //List<RPGItemCategory> itemCategories = Storage.Load<RPGItemCategory>(new RPGItemCategory()); EditorUtils.Separator(); EditorUtils.Label("General item info"); item.IconPath = EditorUtils.TextField(item.IconPath, "Icon name"); item.AtlasName = EditorUtils.TextField(item.AtlasName, "Atlas name"); //item.PrefabName = EditorUtils.TextField(item.PrefabName, "Prefab name"); /*item.Stackable = EditorUtils.Toggle(item.Stackable, "Stack", 100,FieldTypeEnum.BeginningOnly); if (item.Stackable) { item.MaximumStack = EditorUtils.IntField(item.MaximumStack, "Stack amount", 100,FieldTypeEnum.Middle); }*/ //EditorGUILayout.EndHorizontal(); //item.Destroyable = EditorUtils.Toggle(item.Destroyable, "Destroyable"); //item.Droppable = EditorUtils.Toggle(item.Droppable, "Droppable"); EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); //item.LevelItem = EditorGUILayout.IntSlider(item.LevelItem, -1, GlobalSettings.MaxLevel,GUILayout.Width(300)); EditorGUILayout.EndHorizontal(); item.BuyValue = EditorUtils.IntField(item.BuyValue, "buy Value"); item.SellValue = EditorUtils.IntField(item.SellValue, "sell value"); item.BuyCurrency = (BuyCurrencyType)EditorGUILayout.EnumPopup(item.BuyCurrency, GUILayout.Width(300)); EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Rarity"); item.Rarity = (RarityType)EditorGUILayout.EnumPopup(item.Rarity ,GUILayout.Width(300)); EditorGUILayout.PrefixLabel("Item Type"); item.ItemCategory = (ItemType)EditorGUILayout.EnumPopup(item.ItemCategory , GUILayout.Width(300)); EditorGUILayout.EndHorizontal(); EditorUtils.Separator(); /*if (GUILayout.Button("Add item category", GUILayout.Width(350))) { RPGItemCategory itemCateogry = new RPGItemCategory(); item.Categories.Add(itemCateogry); } foreach(RPGItemCategory itemCategory in item.Categories) { AddItemCategory(itemCategory, itemCategories); if (GUILayout.Button("Remove", GUILayout.Width(100))) { item.Categories.Remove(itemCategory); break; } EditorGUILayout.EndHorizontal(); }*/ //EditorUtils.Separator(); EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Stackable"); item.Stackable = EditorGUILayout.Toggle(item.Stackable ,GUILayout.Width(50)); EditorGUILayout.PrefixLabel("Upgradeable"); item.IsUpgradeable = EditorGUILayout.Toggle(item.IsUpgradeable ,GUILayout.Width(50)); EditorGUILayout.PrefixLabel("Usable"); item.IsUsable = EditorGUILayout.Toggle(item.IsUsable ,GUILayout.Width(50)); EditorGUILayout.PrefixLabel("Equippable"); item.IsEquippable = EditorGUILayout.Toggle(item.IsEquippable ,GUILayout.Width(50)); EditorGUILayout.PrefixLabel("limited use?"); item.isLimitedUse = EditorGUILayout.Toggle(item.isLimitedUse ,GUILayout.Width(50)); EditorGUILayout.EndHorizontal(); if (item.IsUsable) { AddUsableItem(item, Data); } if(item.IsEquippable) { EditorUtils.Label("Equiped slot"); item.EquipmentSlotIndex = (EquipmentSlots)EditorGUILayout.EnumPopup(item.EquipmentSlotIndex ,GUILayout.Width(300)); } }
public static void DisplayItemPart(RPGItem item, MainWindowEditor Data) { if (string.IsNullOrEmpty(item.IconPath)) { item.IconPath = string.Empty; } if (string.IsNullOrEmpty(item.AtlasName)) { item.AtlasName = string.Empty; } //if (string.IsNullOrEmpty(item.PrefabName)) // item.PrefabName = string.Empty; //if (item.LevelItem == 0) // item.LevelItem = 1; //List<RPGItemCategory> itemCategories = Storage.Load<RPGItemCategory>(new RPGItemCategory()); EditorUtils.Separator(); EditorUtils.Label("General item info"); item.IconPath = EditorUtils.TextField(item.IconPath, "Icon name"); item.AtlasName = EditorUtils.TextField(item.AtlasName, "Atlas name"); //item.PrefabName = EditorUtils.TextField(item.PrefabName, "Prefab name"); /*item.Stackable = EditorUtils.Toggle(item.Stackable, "Stack", 100,FieldTypeEnum.BeginningOnly); * if (item.Stackable) * { * item.MaximumStack = EditorUtils.IntField(item.MaximumStack, "Stack amount", 100,FieldTypeEnum.Middle); * }*/ //EditorGUILayout.EndHorizontal(); //item.Destroyable = EditorUtils.Toggle(item.Destroyable, "Destroyable"); //item.Droppable = EditorUtils.Toggle(item.Droppable, "Droppable"); EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); //item.LevelItem = EditorGUILayout.IntSlider(item.LevelItem, -1, GlobalSettings.MaxLevel,GUILayout.Width(300)); EditorGUILayout.EndHorizontal(); item.BuyValue = EditorUtils.IntField(item.BuyValue, "buy Value"); item.SellValue = EditorUtils.IntField(item.SellValue, "sell value"); EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Rarity"); item.Rarity = (RarityType)EditorGUILayout.EnumPopup(item.Rarity, GUILayout.Width(300)); EditorGUILayout.PrefixLabel("Item Type"); item.ItemCategory = (ItemType)EditorGUILayout.EnumPopup(item.ItemCategory, GUILayout.Width(300)); EditorGUILayout.EndHorizontal(); EditorUtils.Separator(); /*if (GUILayout.Button("Add item category", GUILayout.Width(350))) * { * RPGItemCategory itemCateogry = new RPGItemCategory(); * item.Categories.Add(itemCateogry); * } * foreach(RPGItemCategory itemCategory in item.Categories) * { * AddItemCategory(itemCategory, itemCategories); * * if (GUILayout.Button("Remove", GUILayout.Width(100))) * { * item.Categories.Remove(itemCategory); * break; * } * * EditorGUILayout.EndHorizontal(); * }*/ //EditorUtils.Separator(); EditorGUILayout.Separator(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Usable"); item.IsUsable = EditorGUILayout.Toggle(item.IsUsable, GUILayout.Width(300)); EditorGUILayout.EndHorizontal(); if (item.IsUsable) { AddUsableItem(item, Data); } }