private void DrawWeaponProperties(ItemWeaponMelee item) { EditorGUILayout.BeginHorizontal(); item.weaponMeleeType = (ItemWeaponMelee.WeaponMeleeTypes)EditorGUILayout.EnumPopup(item.weaponMeleeType, GUILayout.Width(120)); EditorGUILayout.LabelField("Damage", GUILayout.Width(60)); EditorGUILayout.LabelField("Phys", GUILayout.Width(30)); item.damage.minPhysical = EditorGUILayout.IntField(item.damage.minPhysical, GUILayout.Width(30)); EditorGUILayout.LabelField("-", GUILayout.Width(10)); item.damage.maxPhysical = EditorGUILayout.IntField(item.damage.maxPhysical, GUILayout.Width(30)); EditorGUILayout.LabelField(":: Fire", GUILayout.Width(50)); item.damage.fire = EditorGUILayout.IntField(item.damage.fire, GUILayout.Width(30)); EditorGUILayout.LabelField("Ice", GUILayout.Width(30)); item.damage.ice = EditorGUILayout.IntField(item.damage.ice, GUILayout.Width(30)); EditorGUILayout.LabelField("Electro", GUILayout.Width(50)); item.damage.electro = EditorGUILayout.IntField(item.damage.electro, GUILayout.Width(30)); EditorGUILayout.LabelField("Model", GUILayout.Width(50)); item.model = (GameObject)EditorGUILayout.ObjectField(item.model, typeof(GameObject), false); EditorGUILayout.EndHorizontal(); }
public static int GetAnimationId(ItemWeapon item) { if (item.itemType == ItemTypes.Staff) { return(0); } if (item.itemType == ItemTypes.WeaponMelee) { ItemWeaponMelee weapon = (ItemWeaponMelee)item; if (weapon.weaponMeleeType == ItemWeaponMelee.WeaponMeleeTypes.Sword) { return(1); } if (weapon.weaponMeleeType == ItemWeaponMelee.WeaponMeleeTypes.Axe) { return(2); } } return(0); }