diff --git a/Assets/Scenes/test.unity b/Assets/Scenes/test.unity index 685fb44..a9a982d 100644 --- a/Assets/Scenes/test.unity +++ b/Assets/Scenes/test.unity @@ -7887,6 +7887,49 @@ MonoBehaviour: type: 2} m_PrefabInternal: {fileID: 1687207472} m_Script: {fileID: 11500000, guid: 80728dc979fcf5046adbbf7fdd0111de, type: 3} +--- !u!1 &219964154 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 219964156} + - component: {fileID: 219964155} + m_Layer: 0 + m_Name: IsoUnityOptions + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &219964155 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 219964154} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c204e274cec7e6d47969ec04f8f0a937, type: 3} + m_Name: + m_EditorClassIdentifier: + moveCell: {fileID: 11400000, guid: 1285aa62ffa004945b03dfbda9cf0afd, type: 2} + attackCell: {fileID: 11400000, guid: e7bd64f3e7f95d54289deccf42920283, type: 2} + arrowDecoration: {fileID: 11400000, guid: 0db37da799e54d5458c420331560f165, type: 2} +--- !u!4 &219964156 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 219964154} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!21 &222631429 Material: serializedVersion: 6 @@ -31096,7 +31139,6 @@ GameObject: - component: {fileID: 770915872} - component: {fileID: 770915871} - component: {fileID: 770915877} - - component: {fileID: 770915878} m_Layer: 0 m_Name: Game m_TagString: Untagged @@ -31190,20 +31232,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 68e7a284d9a99294a9b7e4ef2fc2b61c, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!114 &770915878 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 770915870} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c204e274cec7e6d47969ec04f8f0a937, type: 3} - m_Name: - m_EditorClassIdentifier: - moveCell: {fileID: 11400000, guid: 1285aa62ffa004945b03dfbda9cf0afd, type: 2} - attackCell: {fileID: 11400000, guid: e7bd64f3e7f95d54289deccf42920283, type: 2} - arrowDecoration: {fileID: 11400000, guid: 0db37da799e54d5458c420331560f165, type: 2} --- !u!43 &771847860 Mesh: m_ObjectHideFlags: 0 diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(1).asset b/Assets/TRPGMaker/Database/Characters/NewCharacter(1).asset index ca7de5f..df69a8b 100644 --- a/Assets/TRPGMaker/Database/Characters/NewCharacter(1).asset +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(1).asset @@ -14,36 +14,8 @@ MonoBehaviour: name: NewCharacter(1) inventory: {fileID: 0} Slots: [] - attributes: - - name: Experience - id: Exp - description: Health points - maxValue: 0 - minValue: 0 - value: 0 - isCore: 1 - - name: Health - id: HP - description: - maxValue: 200 - minValue: 0 - value: 50 - isCore: 1 - - name: asd - id: - description: - maxValue: 0 - minValue: 0 - value: 0 - isCore: 1 - - name: ddddd - id: - description: - maxValue: 0 - minValue: 0 - value: 0 - isCore: 1 + attributes: [] specializedClass: [] - height: 1 - distance: 5 - attackRange: 4 + height: 0 + distance: 0 + attackRange: 0 diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(1).asset.meta b/Assets/TRPGMaker/Database/Characters/NewCharacter(1).asset.meta index e1061b2..40014bd 100644 --- a/Assets/TRPGMaker/Database/Characters/NewCharacter(1).asset.meta +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(1).asset.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 47430d8af55fb254dbd2af8d116d196d -timeCreated: 1521548735 +timeCreated: 1522253470 licenseType: Free NativeFormatImporter: externalObjects: {} diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(2).asset b/Assets/TRPGMaker/Database/Characters/NewCharacter(2).asset index 0db3c36..1c1ab59 100644 --- a/Assets/TRPGMaker/Database/Characters/NewCharacter(2).asset +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(2).asset @@ -18,3 +18,4 @@ MonoBehaviour: specializedClass: [] height: 0 distance: 0 + attackRange: 0 diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(2).asset.meta b/Assets/TRPGMaker/Database/Characters/NewCharacter(2).asset.meta index 151bdbb..db82f89 100644 --- a/Assets/TRPGMaker/Database/Characters/NewCharacter(2).asset.meta +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(2).asset.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: caa5b8cc4b5205b4297289922d3b7e33 -timeCreated: 1521548736 +timeCreated: 1522253478 licenseType: Free NativeFormatImporter: externalObjects: {} diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(3).asset b/Assets/TRPGMaker/Database/Characters/NewCharacter(3).asset index cf285b5..3ee6283 100644 --- a/Assets/TRPGMaker/Database/Characters/NewCharacter(3).asset +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(3).asset @@ -18,3 +18,4 @@ MonoBehaviour: specializedClass: [] height: 0 distance: 0 + attackRange: 0 diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(3).asset.meta b/Assets/TRPGMaker/Database/Characters/NewCharacter(3).asset.meta index f760dae..fd8a209 100644 --- a/Assets/TRPGMaker/Database/Characters/NewCharacter(3).asset.meta +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(3).asset.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 3eca2b4789a5bc44abd112d60d4af688 -timeCreated: 1521548736 +timeCreated: 1522253479 licenseType: Free NativeFormatImporter: externalObjects: {} diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(4).asset b/Assets/TRPGMaker/Database/Characters/NewCharacter(4).asset index a98ad71..35bbc46 100644 --- a/Assets/TRPGMaker/Database/Characters/NewCharacter(4).asset +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(4).asset @@ -18,3 +18,4 @@ MonoBehaviour: specializedClass: [] height: 0 distance: 0 + attackRange: 0 diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(4).asset.meta b/Assets/TRPGMaker/Database/Characters/NewCharacter(4).asset.meta index e62c771..08e9bb1 100644 --- a/Assets/TRPGMaker/Database/Characters/NewCharacter(4).asset.meta +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(4).asset.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 2ce6ded48f42c8e46b99a9a665a8efda -timeCreated: 1521548737 +timeCreated: 1522253481 licenseType: Free NativeFormatImporter: externalObjects: {} diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(5).asset b/Assets/TRPGMaker/Database/Characters/NewCharacter(5).asset new file mode 100644 index 0000000..85d054b --- /dev/null +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(5).asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2d9fb3b8c5fa23c4e8313ab14ed5bdb8, type: 3} + m_Name: NewCharacter(5) + m_EditorClassIdentifier: + name: NewCharacter(5) + inventory: {fileID: 0} + Slots: [] + attributes: [] + specializedClass: [] + height: 0 + distance: 0 + attackRange: 0 diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(5).asset.meta b/Assets/TRPGMaker/Database/Characters/NewCharacter(5).asset.meta new file mode 100644 index 0000000..6789d5d --- /dev/null +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(5).asset.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 75942776545ea02418c221a9273f406b +timeCreated: 1522253487 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(6).asset b/Assets/TRPGMaker/Database/Characters/NewCharacter(6).asset new file mode 100644 index 0000000..9d97a6e --- /dev/null +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(6).asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2d9fb3b8c5fa23c4e8313ab14ed5bdb8, type: 3} + m_Name: NewCharacter(6) + m_EditorClassIdentifier: + name: NewCharacter(6) + inventory: {fileID: 0} + Slots: [] + attributes: [] + specializedClass: [] + height: 0 + distance: 0 + attackRange: 0 diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(6).asset.meta b/Assets/TRPGMaker/Database/Characters/NewCharacter(6).asset.meta new file mode 100644 index 0000000..883a0dc --- /dev/null +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(6).asset.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 496024b31fb8d604ba8b12317f0d4762 +timeCreated: 1522253490 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(7).asset b/Assets/TRPGMaker/Database/Characters/NewCharacter(7).asset new file mode 100644 index 0000000..72d4689 --- /dev/null +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(7).asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2d9fb3b8c5fa23c4e8313ab14ed5bdb8, type: 3} + m_Name: NewCharacter(7) + m_EditorClassIdentifier: + name: NewCharacter(7) + inventory: {fileID: 0} + Slots: [] + attributes: [] + specializedClass: [] + height: 0 + distance: 0 + attackRange: 0 diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter(7).asset.meta b/Assets/TRPGMaker/Database/Characters/NewCharacter(7).asset.meta new file mode 100644 index 0000000..3cb8dfe --- /dev/null +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter(7).asset.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: bac31a58c9f786c4a9d5b67034ba5482 +timeCreated: 1522253492 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter.asset b/Assets/TRPGMaker/Database/Characters/NewCharacter.asset index 1286c3e..a260b21 100644 --- a/Assets/TRPGMaker/Database/Characters/NewCharacter.asset +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter.asset @@ -13,7 +13,19 @@ MonoBehaviour: m_EditorClassIdentifier: name: NewCharacter inventory: {fileID: 0} - Slots: [] + Slots: + - slotType: + modifier: {fileID: 0} + - slotType: + modifier: {fileID: 0} + - slotType: + modifier: {fileID: 0} + - slotType: + modifier: {fileID: 0} + - slotType: + modifier: {fileID: 0} + - slotType: + modifier: {fileID: 0} attributes: - name: Experience id: Exp @@ -25,25 +37,11 @@ MonoBehaviour: - name: Health id: HP description: - maxValue: 200 + maxValue: 4 minValue: 0 - value: 50 - isCore: 1 - - name: asd - id: - description: - maxValue: 0 - minValue: 0 - value: 0 - isCore: 1 - - name: ddddd - id: - description: - maxValue: 0 - minValue: 0 - value: 0 + value: 4 isCore: 1 specializedClass: [] - height: 2 - distance: 8 - attackRange: 3 + height: 0 + distance: 0 + attackRange: 0 diff --git a/Assets/TRPGMaker/Database/Characters/NewCharacter.asset.meta b/Assets/TRPGMaker/Database/Characters/NewCharacter.asset.meta index 0658cb8..9f8551f 100644 --- a/Assets/TRPGMaker/Database/Characters/NewCharacter.asset.meta +++ b/Assets/TRPGMaker/Database/Characters/NewCharacter.asset.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 36a63a88f336fee4fbee3ca4e3812861 -timeCreated: 1521548734 +timeCreated: 1522252234 licenseType: Free NativeFormatImporter: externalObjects: {} diff --git a/Assets/TRPGMaker/Database/Database.asset b/Assets/TRPGMaker/Database/Database.asset index e4e19e7..889bdc6 100644 --- a/Assets/TRPGMaker/Database/Database.asset +++ b/Assets/TRPGMaker/Database/Database.asset @@ -29,23 +29,9 @@ MonoBehaviour: - name: Health id: HP description: - maxValue: 200 + maxValue: 400 minValue: 0 - value: 200 - isCore: 1 - - name: asd - id: - description: - maxValue: 0 - minValue: 0 - value: 0 - isCore: 1 - - name: ddddd - id: - description: - maxValue: 0 - minValue: 0 - value: 0 + value: 400 isCore: 1 tags: - Espada @@ -68,9 +54,16 @@ MonoBehaviour: - {fileID: 11400000, guid: 57e9761131c2f2e4b8cb713783bbfca6, type: 2} - {fileID: 11400000, guid: 5a130b73ed10dc547995fc0a2bdb7831, type: 2} - {fileID: 11400000, guid: 142ad94ba0bd4344c87becbe3ad5fb6f, type: 2} + - {fileID: 11400000, guid: 06cf66b3a4c86414e97e34dc48960713, type: 2} + - {fileID: 11400000, guid: 6f3dd99104fd0b3438870b9989c8700c, type: 2} + - {fileID: 11400000, guid: ca16a4926dfe7684c977bb2d1daa201c, type: 2} + - {fileID: 11400000, guid: d88038761a673534c9e16084ea9d7f58, type: 2} characters: - {fileID: 11400000, guid: 36a63a88f336fee4fbee3ca4e3812861, type: 2} - {fileID: 11400000, guid: 47430d8af55fb254dbd2af8d116d196d, type: 2} - {fileID: 11400000, guid: caa5b8cc4b5205b4297289922d3b7e33, type: 2} - - {fileID: 11400000, guid: 2ce6ded48f42c8e46b99a9a665a8efda, type: 2} - {fileID: 11400000, guid: 3eca2b4789a5bc44abd112d60d4af688, type: 2} + - {fileID: 11400000, guid: 2ce6ded48f42c8e46b99a9a665a8efda, type: 2} + - {fileID: 11400000, guid: 75942776545ea02418c221a9273f406b, type: 2} + - {fileID: 11400000, guid: 496024b31fb8d604ba8b12317f0d4762, type: 2} + - {fileID: 11400000, guid: bac31a58c9f786c4a9d5b67034ba5482, type: 2} diff --git a/Assets/TRPGMaker/Database/Items/New Item(1).asset b/Assets/TRPGMaker/Database/Items/New Item(1).asset index 1573733..831bc0c 100644 --- a/Assets/TRPGMaker/Database/Items/New Item(1).asset +++ b/Assets/TRPGMaker/Database/Items/New Item(1).asset @@ -14,4 +14,6 @@ MonoBehaviour: name: New Item(1) description: Enter item description tags: [] - SlotType: [] + SlotType: + - slotsOcupped: + - Head diff --git a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(1).asset.meta b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(1).asset.meta index c2872a6..4edc06d 100644 --- a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(1).asset.meta +++ b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(1).asset.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 57e9761131c2f2e4b8cb713783bbfca6 -timeCreated: 1521548731 +timeCreated: 1522253215 licenseType: Free NativeFormatImporter: externalObjects: {} diff --git a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(2).asset.meta b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(2).asset.meta index e7d63da..664e11a 100644 --- a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(2).asset.meta +++ b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(2).asset.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 5a130b73ed10dc547995fc0a2bdb7831 -timeCreated: 1521548732 +timeCreated: 1522253216 licenseType: Free NativeFormatImporter: externalObjects: {} diff --git a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(3).asset.meta b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(3).asset.meta index 7f462ca..f696221 100644 --- a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(3).asset.meta +++ b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(3).asset.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 142ad94ba0bd4344c87becbe3ad5fb6f -timeCreated: 1521548733 +timeCreated: 1522253218 licenseType: Free NativeFormatImporter: externalObjects: {} diff --git a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(4).asset b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(4).asset new file mode 100644 index 0000000..f5e52fe --- /dev/null +++ b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(4).asset @@ -0,0 +1,18 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a4cfe1e2b18c9494b8e22325c9a32ff7, type: 3} + m_Name: NewSpecializedClass(4) + m_EditorClassIdentifier: + name: New Specialized Class (4) + tags: [] + slots: [] + attributes: [] + formulas: [] diff --git a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(4).asset.meta b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(4).asset.meta new file mode 100644 index 0000000..9a25dad --- /dev/null +++ b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(4).asset.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 06cf66b3a4c86414e97e34dc48960713 +timeCreated: 1522253218 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(5).asset b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(5).asset new file mode 100644 index 0000000..de504fb --- /dev/null +++ b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(5).asset @@ -0,0 +1,18 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a4cfe1e2b18c9494b8e22325c9a32ff7, type: 3} + m_Name: NewSpecializedClass(5) + m_EditorClassIdentifier: + name: New Specialized Class (5) + tags: [] + slots: [] + attributes: [] + formulas: [] diff --git a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(5).asset.meta b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(5).asset.meta new file mode 100644 index 0000000..16c7abd --- /dev/null +++ b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(5).asset.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 6f3dd99104fd0b3438870b9989c8700c +timeCreated: 1522253220 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(6).asset b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(6).asset new file mode 100644 index 0000000..b33cbab --- /dev/null +++ b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(6).asset @@ -0,0 +1,18 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a4cfe1e2b18c9494b8e22325c9a32ff7, type: 3} + m_Name: NewSpecializedClass(6) + m_EditorClassIdentifier: + name: New Specialized Class (6) + tags: [] + slots: [] + attributes: [] + formulas: [] diff --git a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(6).asset.meta b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(6).asset.meta new file mode 100644 index 0000000..1633788 --- /dev/null +++ b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(6).asset.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: ca16a4926dfe7684c977bb2d1daa201c +timeCreated: 1522253221 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(7).asset b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(7).asset new file mode 100644 index 0000000..f7cdee9 --- /dev/null +++ b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(7).asset @@ -0,0 +1,18 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a4cfe1e2b18c9494b8e22325c9a32ff7, type: 3} + m_Name: NewSpecializedClass(7) + m_EditorClassIdentifier: + name: New Specialized Class (7) + tags: [] + slots: [] + attributes: [] + formulas: [] diff --git a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(7).asset.meta b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(7).asset.meta new file mode 100644 index 0000000..69e0bea --- /dev/null +++ b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass(7).asset.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: d88038761a673534c9e16084ea9d7f58 +timeCreated: 1522253222 +licenseType: Free +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass.asset b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass.asset index 44921e0..743861d 100644 --- a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass.asset +++ b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass.asset @@ -14,5 +14,19 @@ MonoBehaviour: name: New Specialized Class tags: [] slots: [] - attributes: [] + attributes: + - name: Experience + id: Exp + description: Health points + maxValue: 0 + minValue: 0 + value: 0 + isCore: 1 + - name: Health + id: HP + description: + maxValue: 22 + minValue: 0 + value: 22 + isCore: 1 formulas: [] diff --git a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass.asset.meta b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass.asset.meta index 1342650..f9e2bb9 100644 --- a/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass.asset.meta +++ b/Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass.asset.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 684c928e26a3b364c9cc9cff30e18082 -timeCreated: 1521548730 +timeCreated: 1522252240 licenseType: Free NativeFormatImporter: externalObjects: {} diff --git a/Assets/TRPGMaker/Editor/CharacterEditor.cs b/Assets/TRPGMaker/Editor/CharacterEditor.cs index 3e53b0d..f9eccf4 100644 --- a/Assets/TRPGMaker/Editor/CharacterEditor.cs +++ b/Assets/TRPGMaker/Editor/CharacterEditor.cs @@ -13,9 +13,11 @@ public class CharacterEditor : Editor { private ReorderableList listSlots; private ReorderableList listAttributes; + private Vector2 scrollPosition; + // Get attributes SpecialClass List attributes; - //List specializedClasses; + List specializedClasses; private string[] attributesStringArray; private int formulaAttributeSelected = -1; private int slotTypeSelected = -1; @@ -35,6 +37,8 @@ private void reloadAttributes() private void OnEnable() { + reloadAttributes(); + // Get Slots listSlots = new ReorderableList(serializedObject, serializedObject.FindProperty("Slots"), @@ -45,13 +49,10 @@ private void OnEnable() serializedObject.FindProperty("attributes"), false, true, true, true); - /*Get List SpecializedClass + //Get List SpecializedClass listSpecializedClass = new ReorderableList(serializedObject, serializedObject.FindProperty("specializedClass"), false, true, true, true); - */ - - reloadAttributes(); // Draw Slots listSlots.drawElementCallback = @@ -75,24 +76,32 @@ private void OnEnable() } }; - /* Draw specialzed classes + //Draw specialzed classes listSpecializedClass.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => { rect.y += 2; EditorGUI.LabelField( new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight), specializedClasses[index].name); - }; - */ + }; // Draw attributes listAttributes.drawElementCallback = - (Rect rect, int index, bool isActive, bool isFocused) => { - rect.y += 2; - EditorGUI.LabelField( - new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight), - attributes[index].name); - }; + (Rect rectL, int index, bool isActive, bool isFocused) => { + var element = listAttributes.serializedProperty.GetArrayElementAtIndex(index); + rectL.y += 2; + + if (element.propertyType == SerializedPropertyType.Generic) + { + EditorGUI.LabelField(new Rect(rectL.x + 15, rectL.y, rectL.width, rectL.height), element.displayName); + } + rectL.height = EditorGUI.GetPropertyHeight(element, GUIContent.none, true); + rectL.y += 1; + EditorGUI.PropertyField(rectL, element, GUIContent.none, true); + listAttributes.elementHeight = rectL.height + 4.0f; + }; + + listAttributes.elementHeightCallback += (idx) => { return Mathf.Max(EditorGUIUtility.singleLineHeight, EditorGUI.GetPropertyHeight(listAttributes.serializedProperty.GetArrayElementAtIndex(idx), GUIContent.none, true)) + 4.0f; }; // Slots header listSlots.drawHeaderCallback = (Rect rect) => { @@ -104,10 +113,10 @@ private void OnEnable() EditorGUI.LabelField(rect, "Attributes"); }; - /* listSpecializedClass header + //listSpecializedClass header listSpecializedClass.drawHeaderCallback = (Rect rect) => { EditorGUI.LabelField(rect, "Specialized Classes"); - }; */ + }; // Add slot listSlots.onAddDropdownCallback = (Rect buttonRect, ReorderableList l) => { @@ -128,7 +137,7 @@ private void OnEnable() menu.ShowAsContext(); }; - /* add specialiced class + // add specialiced class listSpecializedClass.onAddDropdownCallback = (Rect buttonRect, ReorderableList l) => { var menu = new GenericMenu(); foreach (SpecializedClass spec in Database.Instance.specializedClasses) @@ -137,7 +146,6 @@ private void OnEnable() } menu.ShowAsContext(); }; - */ // Eliminar atributo listAttributes.onCanRemoveCallback = (ReorderableList l) => { @@ -161,6 +169,9 @@ public override void OnInspectorGUI() customStyle.fontSize = 17; GUI.Label(new Rect(EditorGUILayout.GetControlRect().x, EditorGUILayout.GetControlRect().y, EditorGUILayout.GetControlRect().width, 30), "Editing \"" + character.name + "\" character:", customStyle); + EditorGUILayout.BeginVertical(); + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); + EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(serializedObject.FindProperty("name"), new GUIContent("Name: "), GUILayout.MinWidth(100)); EditorGUILayout.PropertyField(serializedObject.FindProperty("distance"), new GUIContent("Distance: "), GUILayout.MinWidth(100)); @@ -176,6 +187,9 @@ public override void OnInspectorGUI() listAttributes.DoLayoutList(); //listSpecializedClass.DoLayoutList(); serializedObject.ApplyModifiedProperties(); + + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); } private void clickHandlerAttributes(object target) @@ -185,12 +199,10 @@ private void clickHandlerAttributes(object target) serializedObject.ApplyModifiedProperties(); } - /* private void clickHandlerSpecializedClass(object target) { var data = (SpecializedClass) target; specializedClasses.Add(data); serializedObject.ApplyModifiedProperties(); } - */ } \ No newline at end of file diff --git a/Assets/TRPGMaker/Editor/ItemEditor.cs b/Assets/TRPGMaker/Editor/ItemEditor.cs index b5398b4..13dcf16 100644 --- a/Assets/TRPGMaker/Editor/ItemEditor.cs +++ b/Assets/TRPGMaker/Editor/ItemEditor.cs @@ -16,6 +16,9 @@ public class ItemEditor : Editor private string lastTag; int lastCursorPos = 0; + + private Vector2 scrollPosition; + void Init() { dropDown = new DropDown("Tags:"); @@ -37,6 +40,9 @@ public override void OnInspectorGUI() customStyle.fontSize = 17; GUI.Label(new Rect(EditorGUILayout.GetControlRect().x, EditorGUILayout.GetControlRect().y, EditorGUILayout.GetControlRect().width, 30), "Editing \"" + item.name + "\" item:", customStyle); + EditorGUILayout.BeginVertical(); + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); + EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(serializedObject.FindProperty("name"), new GUIContent("Name: "), GUILayout.MinWidth(100)); EditorGUILayout.PropertyField(serializedObject.FindProperty("description"), new GUIContent("Description: "), GUILayout.MinWidth(100)); @@ -136,6 +142,9 @@ public override void OnInspectorGUI() //GUI.FocusControl("Tags:"); } } + + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); } void dropDownSearch() diff --git a/Assets/TRPGMaker/Editor/SpecializedClassEditor.cs b/Assets/TRPGMaker/Editor/SpecializedClassEditor.cs index 1b75659..6fe968b 100644 --- a/Assets/TRPGMaker/Editor/SpecializedClassEditor.cs +++ b/Assets/TRPGMaker/Editor/SpecializedClassEditor.cs @@ -14,6 +14,8 @@ public class SpecializedClassEditor : Editor { private ReorderableList listFormulas; private SpecializedClass specializedClass; + private Vector2 scrollPosition; + // Get attributes SpecialClass List attributes; private string[] attributesStringArray; @@ -90,12 +92,21 @@ private void OnEnable() // Draw attributes listAttributes.drawElementCallback = - (Rect rect, int index, bool isActive, bool isFocused) => { - rect.y += 2; - EditorGUI.LabelField( - new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight), - attributes[index].name); - }; + (Rect rectL, int index, bool isActive, bool isFocused) => { + var element = listAttributes.serializedProperty.GetArrayElementAtIndex(index); + rectL.y += 2; + + if (element.propertyType == SerializedPropertyType.Generic) + { + EditorGUI.LabelField(new Rect(rectL.x + 15, rectL.y, rectL.width, rectL.height), element.displayName); + } + rectL.height = EditorGUI.GetPropertyHeight(element, GUIContent.none, true); + rectL.y += 1; + EditorGUI.PropertyField(rectL, element, GUIContent.none, true); + listAttributes.elementHeight = rectL.height + 4.0f; + }; + + listAttributes.elementHeightCallback += (idx) => { return Mathf.Max(EditorGUIUtility.singleLineHeight, EditorGUI.GetPropertyHeight(listAttributes.serializedProperty.GetArrayElementAtIndex(idx), GUIContent.none, true)) + 4.0f; }; // Draw formulas listFormulas.drawElementCallback = @@ -192,6 +203,9 @@ public override void OnInspectorGUI() customStyle.fontSize = 17; GUI.Label(new Rect(EditorGUILayout.GetControlRect().x, EditorGUILayout.GetControlRect().y, EditorGUILayout.GetControlRect().width, 30), "Editing \"" + specializedClass.name + "\" specialized class:", customStyle); + EditorGUILayout.BeginVertical(); + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); + EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(serializedObject.FindProperty("name"), new GUIContent("Name: "), GUILayout.MinWidth(100)); if (EditorGUI.EndChangeCheck()) @@ -204,6 +218,9 @@ public override void OnInspectorGUI() listAttributes.DoLayoutList(); listFormulas.DoLayoutList(); serializedObject.ApplyModifiedProperties(); + + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); } private void clickHandlerAttributes(object target) diff --git a/Assets/TRPGMaker/Editor/Windows/Connector.meta b/Assets/TRPGMaker/Editor/Windows/Connector.meta new file mode 100644 index 0000000..9395a19 --- /dev/null +++ b/Assets/TRPGMaker/Editor/Windows/Connector.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1f68d2538a9bbd5489f53dba81dce55a +folderAsset: yes +timeCreated: 1522164216 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TRPGMaker/Editor/Windows/Connector/ConnectorWindow.cs b/Assets/TRPGMaker/Editor/Windows/Connector/ConnectorWindow.cs new file mode 100644 index 0000000..b3b4936 --- /dev/null +++ b/Assets/TRPGMaker/Editor/Windows/Connector/ConnectorWindow.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +public class ConnectorWindow : EditorWindow{ + + private int selectedIndex = -1; + private List connectors; + + [MenuItem("TRPGMaker/Connector options", false, 1)] + public static void ShowWindow() + { + EditorWindow.GetWindow(typeof(ConnectorWindow), false, "Connector options"); + } + + private void OnEnable() + { + // Search all classes that implement ITRPGMapConnector + var type = typeof(ITRPGMapConnector); + var types = AppDomain.CurrentDomain.GetAssemblies() + .SelectMany(s => s.GetTypes()) + .Where(p => type.IsAssignableFrom(p) && !p.IsInterface); + + connectors = new List(); + foreach (var c in types) + { + connectors.Add(c); + } + + // Search if connector exist and set selected index + // If new connector is implemented this needs to be implmented in preference order + UnityEngine.Object[] objects = Resources.FindObjectsOfTypeAll(typeof(IsoUnityOptions)); + if (objects.Length >= 1) + { + selectedIndex = connectors.IndexOf(connectors.FirstOrDefault(c => c.Name == "IsoUnityConnector")); + } + } + + void OnGUI() + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Select connector:"); + selectedIndex = EditorGUILayout.Popup(selectedIndex, connectors.Select(c => c.Name).ToArray()); + EditorGUILayout.EndHorizontal(); + + // Case IsoUnityConnector + if (selectedIndex == connectors.IndexOf(connectors.FirstOrDefault(c => c.Name == "IsoUnityConnector"))){ + UnityEngine.Object[] objects = Resources.FindObjectsOfTypeAll(typeof(IsoUnityOptions)); + if (objects.Length < 1) + { + GameObject isounityOptions = new GameObject("IsoUnityOptions"); + isounityOptions.AddComponent(); + Debug.Log("IsoUnityConnector is not asigned to any 'IsoUnityOptions' GameObject, automatically created!"); + Repaint(); + } + else if (objects.Length > 1) + { + Debug.Log("Multiple IsoUnityOptions scripts in scene! Assing just one to an 'IsoUnityOptions' GameObject or remove all an will be automatically created."); + } + else if (objects[0].name != "IsoUnityOptions") + { + Debug.Log("IsoUnityOptions needs to be assigned in an 'IsoUnityOptions' GameObject, rename GameObject or remove Component and it will be automatically created."); + } + else { + Editor editor = Editor.CreateEditor(objects[0]); + editor.DrawDefaultInspector(); + } + } + + // Other cases: + // If a new connector is created needs an editor to be implemented here + } + +} diff --git a/Assets/TRPGMaker/Editor/Windows/Connector/ConnectorWindow.cs.meta b/Assets/TRPGMaker/Editor/Windows/Connector/ConnectorWindow.cs.meta new file mode 100644 index 0000000..cb0a271 --- /dev/null +++ b/Assets/TRPGMaker/Editor/Windows/Connector/ConnectorWindow.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 9e790d6d652149b418e3f8c5ccad8be3 +timeCreated: 1522164227 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TRPGMaker/Editor/Windows/Database.meta b/Assets/TRPGMaker/Editor/Windows/Database.meta new file mode 100644 index 0000000..068478f --- /dev/null +++ b/Assets/TRPGMaker/Editor/Windows/Database.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 8db258c2f5133fb438a34407f7b28632 +folderAsset: yes +timeCreated: 1522164169 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TRPGMaker/Editor/Windows/AttributesWindow.cs b/Assets/TRPGMaker/Editor/Windows/Database/AttributesWindow.cs similarity index 93% rename from Assets/TRPGMaker/Editor/Windows/AttributesWindow.cs rename to Assets/TRPGMaker/Editor/Windows/Database/AttributesWindow.cs index 8ad9a81..a37eb95 100644 --- a/Assets/TRPGMaker/Editor/Windows/AttributesWindow.cs +++ b/Assets/TRPGMaker/Editor/Windows/Database/AttributesWindow.cs @@ -7,6 +7,7 @@ public class AttributesWindow : LayoutWindow { private ReorderableList listAttributes; + private Vector2 scrollPosition; public override void Init() { @@ -24,10 +25,16 @@ public override void Draw(Rect rect) "\n - Edit an attribute expanding with the arrow and changing any value." + "\n - Remove any attribute selecting it and clicking on the \"-\" symbol or right-click on it and select \"Delete array element.\"", MessageType.Info); + EditorGUILayout.BeginVertical(); + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); + listAttributes.DoLayoutList(); GUILayout.EndVertical(); + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); + editor.serializedObject.ApplyModifiedProperties(); } diff --git a/Assets/TRPGMaker/Editor/Windows/AttributesWindow.cs.meta b/Assets/TRPGMaker/Editor/Windows/Database/AttributesWindow.cs.meta similarity index 100% rename from Assets/TRPGMaker/Editor/Windows/AttributesWindow.cs.meta rename to Assets/TRPGMaker/Editor/Windows/Database/AttributesWindow.cs.meta diff --git a/Assets/TRPGMaker/Editor/Windows/CharacterWindow.cs b/Assets/TRPGMaker/Editor/Windows/Database/CharacterWindow.cs similarity index 96% rename from Assets/TRPGMaker/Editor/Windows/CharacterWindow.cs rename to Assets/TRPGMaker/Editor/Windows/Database/CharacterWindow.cs index 6b33757..62d470a 100644 --- a/Assets/TRPGMaker/Editor/Windows/CharacterWindow.cs +++ b/Assets/TRPGMaker/Editor/Windows/Database/CharacterWindow.cs @@ -8,6 +8,7 @@ public class CharacterWindow : LayoutWindow { private ReorderableList listCharacters; private Editor buttonEditor; + private Vector2 scrollPosition; public override void Init() { @@ -35,6 +36,9 @@ public void DrawMainView() GUIStyle gsLineOdd = new GUIStyle(); gsLineOdd.normal.background = MakeTextureColor.MakeTexture(600, 1, new Color(0.5f, 0.5f, 0.5f, 0.0f)); + EditorGUILayout.BeginVertical(); + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); + for (int i = 0; i < Database.Instance.characters.Count; i++) { Character character = Database.Instance.characters[i]; @@ -57,6 +61,8 @@ public void DrawMainView() GUILayout.EndHorizontal(); } + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); } public override bool Button(Rect rect) diff --git a/Assets/TRPGMaker/Editor/Windows/CharacterWindow.cs.meta b/Assets/TRPGMaker/Editor/Windows/Database/CharacterWindow.cs.meta similarity index 100% rename from Assets/TRPGMaker/Editor/Windows/CharacterWindow.cs.meta rename to Assets/TRPGMaker/Editor/Windows/Database/CharacterWindow.cs.meta diff --git a/Assets/TRPGMaker/Editor/Windows/DatabaseWindow.cs b/Assets/TRPGMaker/Editor/Windows/Database/DatabaseWindow.cs similarity index 98% rename from Assets/TRPGMaker/Editor/Windows/DatabaseWindow.cs rename to Assets/TRPGMaker/Editor/Windows/Database/DatabaseWindow.cs index b5cc2d1..2c90cae 100644 --- a/Assets/TRPGMaker/Editor/Windows/DatabaseWindow.cs +++ b/Assets/TRPGMaker/Editor/Windows/Database/DatabaseWindow.cs @@ -20,7 +20,7 @@ class DatabaseWindow : EditorWindow private LayoutWindow specilizedWindow; private LayoutWindow characterWindow; - [MenuItem("TRPGMaker/Database editor")] + [MenuItem("TRPGMaker/Database editor", false, 0)] public static void ShowWindow() { EditorWindow.GetWindow(typeof(DatabaseWindow), false, "Database Editor"); diff --git a/Assets/TRPGMaker/Editor/Windows/DatabaseWindow.cs.meta b/Assets/TRPGMaker/Editor/Windows/Database/DatabaseWindow.cs.meta similarity index 100% rename from Assets/TRPGMaker/Editor/Windows/DatabaseWindow.cs.meta rename to Assets/TRPGMaker/Editor/Windows/Database/DatabaseWindow.cs.meta diff --git a/Assets/TRPGMaker/Editor/Windows/ItemWindow.cs b/Assets/TRPGMaker/Editor/Windows/Database/ItemWindow.cs similarity index 96% rename from Assets/TRPGMaker/Editor/Windows/ItemWindow.cs rename to Assets/TRPGMaker/Editor/Windows/Database/ItemWindow.cs index aeeeff7..79e13f2 100644 --- a/Assets/TRPGMaker/Editor/Windows/ItemWindow.cs +++ b/Assets/TRPGMaker/Editor/Windows/Database/ItemWindow.cs @@ -8,6 +8,7 @@ class ItemWindow : LayoutWindow { private ReorderableList listItems; private Editor buttonEditor; + private Vector2 scrollPosition; public override void Init() { @@ -29,6 +30,9 @@ public void DrawMainView() customStyle.fontSize = 17; GUI.Label(new Rect(EditorGUILayout.GetControlRect().x, EditorGUILayout.GetControlRect().y, EditorGUILayout.GetControlRect().width, 30), "List of items:", customStyle); + EditorGUILayout.BeginVertical(); + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); + // Create color for each line GUIStyle gsLinePair = new GUIStyle(); gsLinePair.normal.background = MakeTextureColor.MakeTexture(600, 1, new Color(0.5f, 0.5f, 0.5f, 0.5f)); @@ -54,7 +58,10 @@ public void DrawMainView() } GUILayout.EndHorizontal(); } - + + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); + } public override bool Button(Rect rect) diff --git a/Assets/TRPGMaker/Editor/Windows/ItemWindow.cs.meta b/Assets/TRPGMaker/Editor/Windows/Database/ItemWindow.cs.meta similarity index 100% rename from Assets/TRPGMaker/Editor/Windows/ItemWindow.cs.meta rename to Assets/TRPGMaker/Editor/Windows/Database/ItemWindow.cs.meta diff --git a/Assets/TRPGMaker/Editor/Windows/LayoutWindow.cs b/Assets/TRPGMaker/Editor/Windows/Database/LayoutWindow.cs similarity index 100% rename from Assets/TRPGMaker/Editor/Windows/LayoutWindow.cs rename to Assets/TRPGMaker/Editor/Windows/Database/LayoutWindow.cs diff --git a/Assets/TRPGMaker/Editor/Windows/LayoutWindow.cs.meta b/Assets/TRPGMaker/Editor/Windows/Database/LayoutWindow.cs.meta similarity index 100% rename from Assets/TRPGMaker/Editor/Windows/LayoutWindow.cs.meta rename to Assets/TRPGMaker/Editor/Windows/Database/LayoutWindow.cs.meta diff --git a/Assets/TRPGMaker/Editor/Windows/SlotTypeWindow.cs b/Assets/TRPGMaker/Editor/Windows/Database/SlotTypeWindow.cs similarity index 92% rename from Assets/TRPGMaker/Editor/Windows/SlotTypeWindow.cs rename to Assets/TRPGMaker/Editor/Windows/Database/SlotTypeWindow.cs index 788120c..ce342dd 100644 --- a/Assets/TRPGMaker/Editor/Windows/SlotTypeWindow.cs +++ b/Assets/TRPGMaker/Editor/Windows/Database/SlotTypeWindow.cs @@ -7,6 +7,7 @@ public class SlotTypeWindow : LayoutWindow { private ReorderableList listSlotTypes; + private Vector2 scrollPosition; public override void Init() { @@ -24,10 +25,16 @@ public override void Draw(Rect rect) "\n - Edit a slot type name." + "\n - Remove any slot type selecting it and clicking on the \"-\" symbol.", MessageType.Info); + EditorGUILayout.BeginVertical(); + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); + listSlotTypes.DoLayoutList(); GUILayout.EndVertical(); + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); + editor.serializedObject.ApplyModifiedProperties(); } diff --git a/Assets/TRPGMaker/Editor/Windows/SlotTypeWindow.cs.meta b/Assets/TRPGMaker/Editor/Windows/Database/SlotTypeWindow.cs.meta similarity index 100% rename from Assets/TRPGMaker/Editor/Windows/SlotTypeWindow.cs.meta rename to Assets/TRPGMaker/Editor/Windows/Database/SlotTypeWindow.cs.meta diff --git a/Assets/TRPGMaker/Editor/Windows/SpecializedClassWindow.cs b/Assets/TRPGMaker/Editor/Windows/Database/SpecializedClassWindow.cs similarity index 95% rename from Assets/TRPGMaker/Editor/Windows/SpecializedClassWindow.cs rename to Assets/TRPGMaker/Editor/Windows/Database/SpecializedClassWindow.cs index 1c94ba3..de9d537 100644 --- a/Assets/TRPGMaker/Editor/Windows/SpecializedClassWindow.cs +++ b/Assets/TRPGMaker/Editor/Windows/Database/SpecializedClassWindow.cs @@ -8,6 +8,7 @@ class SpecializedClassWindow : LayoutWindow { private ReorderableList listSpecializedClass; private Editor buttonEditor; + private Vector2 scrollPosition; public override void Init() { @@ -35,6 +36,9 @@ public void DrawMainView() GUIStyle gsLineOdd = new GUIStyle(); gsLineOdd.normal.background = MakeTextureColor.MakeTexture(600, 1, new Color(0.5f, 0.5f, 0.5f, 0.0f)); + EditorGUILayout.BeginVertical(); + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); + for (int i = 0; i < Database.Instance.specializedClasses.Count; i++) { SpecializedClass specializedClass = Database.Instance.specializedClasses[i]; @@ -57,6 +61,8 @@ public void DrawMainView() GUILayout.EndHorizontal(); } + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); } public override bool Button(Rect rect) @@ -113,7 +119,8 @@ private void createButtonReorderableList() // On new specialized class listSpecializedClass.onAddDropdownCallback = (Rect buttonRect, ReorderableList l) => { - SpecializedClass specializedClass = (SpecializedClass)ScriptableObject.CreateInstance(typeof(SpecializedClass)); + SpecializedClass specializedClass = (SpecializedClass)ScriptableObject.CreateInstance(typeof(SpecializedClass)); + specializedClass.Init(); var _exists = AssetDatabase.LoadAssetAtPath("Assets/TRPGMaker/Database/SpecializedClasses/NewSpecializedClass.asset", typeof(SpecializedClass)); if (_exists == null) diff --git a/Assets/TRPGMaker/Editor/Windows/SpecializedClassWindow.cs.meta b/Assets/TRPGMaker/Editor/Windows/Database/SpecializedClassWindow.cs.meta similarity index 100% rename from Assets/TRPGMaker/Editor/Windows/SpecializedClassWindow.cs.meta rename to Assets/TRPGMaker/Editor/Windows/Database/SpecializedClassWindow.cs.meta diff --git a/Assets/TRPGMaker/Editor/Windows/TagWindow.cs b/Assets/TRPGMaker/Editor/Windows/Database/TagWindow.cs similarity index 91% rename from Assets/TRPGMaker/Editor/Windows/TagWindow.cs rename to Assets/TRPGMaker/Editor/Windows/Database/TagWindow.cs index 50d960e..378feb5 100644 --- a/Assets/TRPGMaker/Editor/Windows/TagWindow.cs +++ b/Assets/TRPGMaker/Editor/Windows/Database/TagWindow.cs @@ -7,6 +7,7 @@ public class TagWindow : LayoutWindow { private ReorderableList listTags; + private Vector2 scrollPosition; public override void Init() { @@ -24,10 +25,16 @@ public override void Draw(Rect rect) "\n - Edit a tag name." + "\n - Remove any tag selecting it and clicking on the \"-\" symbol.", MessageType.Info); + EditorGUILayout.BeginVertical(); + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); + listTags.DoLayoutList(); GUILayout.EndVertical(); + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); + editor.serializedObject.ApplyModifiedProperties(); } diff --git a/Assets/TRPGMaker/Editor/Windows/TagWindow.cs.meta b/Assets/TRPGMaker/Editor/Windows/Database/TagWindow.cs.meta similarity index 100% rename from Assets/TRPGMaker/Editor/Windows/TagWindow.cs.meta rename to Assets/TRPGMaker/Editor/Windows/Database/TagWindow.cs.meta diff --git a/Assets/TRPGMaker/Editor/Windows/WelcomeWindow.cs b/Assets/TRPGMaker/Editor/Windows/Database/WelcomeWindow.cs similarity index 100% rename from Assets/TRPGMaker/Editor/Windows/WelcomeWindow.cs rename to Assets/TRPGMaker/Editor/Windows/Database/WelcomeWindow.cs diff --git a/Assets/TRPGMaker/Editor/Windows/WelcomeWindow.cs.meta b/Assets/TRPGMaker/Editor/Windows/Database/WelcomeWindow.cs.meta similarity index 100% rename from Assets/TRPGMaker/Editor/Windows/WelcomeWindow.cs.meta rename to Assets/TRPGMaker/Editor/Windows/Database/WelcomeWindow.cs.meta diff --git a/Assets/TRPGMaker/Scripts/Connectors/IsoUnityConnector.cs b/Assets/TRPGMaker/Scripts/Connectors/IsoUnityConnector.cs index 77eca9a..c0cc239 100644 --- a/Assets/TRPGMaker/Scripts/Connectors/IsoUnityConnector.cs +++ b/Assets/TRPGMaker/Scripts/Connectors/IsoUnityConnector.cs @@ -118,8 +118,7 @@ public CellWithDistance(IsoUnity.Cell cell, float distance) private void CalculateDistanceArea(Entity entity, IsoUnity.Cell currentCell, EventTypes eventType, int distanceMax, int heighMax) { /************ This would be changed! ********************/ - IsoUnity.Game game = GameObject.Find("Game").GetComponent(); - IsoUnityOptions isoUnityOptions = game.transform.GetComponent(typeof(IsoUnityOptions)) as IsoUnityOptions; + IsoUnityOptions isoUnityOptions = GameObject.Find("IsoUnityOptions").GetComponent(typeof(IsoUnityOptions)) as IsoUnityOptions; IsoUnity.IsoTexture colorMove = isoUnityOptions.moveCell; IsoUnity.IsoTexture colorAttack = isoUnityOptions.attackCell; IsoUnity.IsoDecoration arrow = isoUnityOptions.arrowDecoration; diff --git a/Assets/TRPGMaker/Scripts/Database/Character.cs b/Assets/TRPGMaker/Scripts/Database/Character.cs index 42daa4f..670a199 100644 --- a/Assets/TRPGMaker/Scripts/Database/Character.cs +++ b/Assets/TRPGMaker/Scripts/Database/Character.cs @@ -29,7 +29,6 @@ public class Character: ScriptableObject{ public void init() { Slots = new List(); - attributes = new List(); specializedClass = new List(); } @@ -39,11 +38,10 @@ public void refreshAttributes() attributes = Extensions.Clone(Database.Instance.attributes.Where(x => x.isCore).ToList()).ToList(); else { + attributes.AddRange(Extensions.Clone(Database.Instance.attributes.Where(x => !attributes.Any(y => y.id == x.id) && x.isCore).ToList())); List aux = new List(); - aux = Extensions.Clone(attributes.Where(x => !x.isCore && Database.Instance.attributes.Contains(x)).ToList()).ToList(); - attributes = new List(); - attributes.AddRange(Extensions.Clone(Database.Instance.attributes.Where(x => x.isCore).ToList())); - attributes.AddRange(aux); + aux.AddRange(attributes.Where(x => Database.Instance.attributes.Any(y => y.id == x.id))); + attributes = aux; } } } \ No newline at end of file diff --git a/Assets/TRPGMaker/Scripts/Database/SpecializedClass.cs b/Assets/TRPGMaker/Scripts/Database/SpecializedClass.cs index a9e46a7..f0eaeaf 100644 --- a/Assets/TRPGMaker/Scripts/Database/SpecializedClass.cs +++ b/Assets/TRPGMaker/Scripts/Database/SpecializedClass.cs @@ -16,18 +16,24 @@ public class SpecializedClass : ScriptableObject public List attributes = null; public List formulas; + public void Init() + { + tags = new List(); + slots = new List(); + formulas = new List(); + } + // Por si se han añadido nuevos atributos CORE a Database public void refreshAttributes() { if (attributes == null) - attributes = Database.Instance.attributes.Where(x => x.isCore).ToList(); + attributes = Extensions.Clone(Database.Instance.attributes.Where(x => x.isCore).ToList()).ToList(); else { + attributes.AddRange(Extensions.Clone(Database.Instance.attributes.Where(x => !attributes.Any(y => y.id == x.id) && x.isCore).ToList())); List aux = new List(); - aux = attributes.Where(x => !x.isCore && Database.Instance.attributes.Contains(x)).ToList(); - attributes = new List(); - attributes.AddRange(Database.Instance.attributes.Where(x => x.isCore).ToList()); - attributes.AddRange(aux); + aux.AddRange(attributes.Where(x => Database.Instance.attributes.Any(y => y.id == x.id))); + attributes = aux; } }