Skip to content

Commit

Permalink
BattleOptions, teams playable, many changes and fixes
Browse files Browse the repository at this point in the history
-Battle options:
· Created class
· New menu for battle
· Created window
· Battle options added to database
· TRPGOptions for TRPG Games
- IsoUnityConnector:
· Changed to get Battle options
· Start method
- IsoUnityOptions moved to IsoUnityGame
- Teams playable
- Database editor: added teams
- Debug logs for errors
- Fixed persistent data errors
  • Loading branch information
WyrnCael committed Apr 5, 2018
1 parent 50e93b6 commit dddf04e
Show file tree
Hide file tree
Showing 26 changed files with 572 additions and 137 deletions.
58 changes: 15 additions & 43 deletions Assets/Scenes/test.unity
Original file line number Diff line number Diff line change
Expand Up @@ -7887,49 +7887,6 @@ 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
Expand Down Expand Up @@ -31139,6 +31096,7 @@ GameObject:
- component: {fileID: 770915872}
- component: {fileID: 770915871}
- component: {fileID: 770915877}
- component: {fileID: 770915878}
m_Layer: 0
m_Name: Game
m_TagString: Untagged
Expand Down Expand Up @@ -31232,6 +31190,20 @@ 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
Expand Down
33 changes: 29 additions & 4 deletions Assets/TRPGMaker/Database/Characters/NewCharacter(1).asset
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,33 @@ MonoBehaviour:
name: NewCharacter(1)
inventory: {fileID: 0}
Slots: []
attributes: []
attributes:
- name: Health
id: HP
description:
maxValue: 300
minValue: 0
value: 300
isCore: 1
- name: Move Height
id: MVH
description:
maxValue: 2
minValue: 2
value: 2
isCore: 1
- name: Attack Range
id: ATR
description:
maxValue: 3
minValue: 3
value: 3
isCore: 1
- name: AttackHeight
id: ATH
description:
maxValue: 2
minValue: 2
value: 2
isCore: 1
specializedClass: []
height: 0
distance: 0
attackRange: 0
40 changes: 29 additions & 11 deletions Assets/TRPGMaker/Database/Characters/NewCharacter.asset
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,39 @@ MonoBehaviour:
- slotType:
modifier: {fileID: 0}
attributes:
- name: Experience
id: Exp
description: Health points
maxValue: 0
minValue: 0
value: 0
isCore: 1
- name: Health
id: HP
description:
maxValue: 4
maxValue: 250
minValue: 0
value: 250
isCore: 1
- name: Move Range
id: MVR
description:
maxValue: 4
minValue: 4
value: 4
isCore: 1
- name: Move Height
id: MVH
description:
maxValue: 2
minValue: 2
value: 2
isCore: 1
- name: Attack Range
id: ATR
description:
maxValue: 3
minValue: 3
value: 3
isCore: 1
- name: AttackHeight
id: ATH
description:
maxValue: 2
minValue: 2
value: 2
isCore: 1
specializedClass: []
height: 0
distance: 0
attackRange: 0
91 changes: 74 additions & 17 deletions Assets/TRPGMaker/Database/Database.asset
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,40 @@ MonoBehaviour:
m_Name: Database
m_EditorClassIdentifier:
attributes:
- name: Experience
id: Exp
description: Health points
maxValue: 0
minValue: 0
value: 0
isCore: 1
- name: Mana
id: Man
description: Health points
maxValue: 0
minValue: 0
value: 0
isCore: 0
- name: Health
id: HP
description:
maxValue: 400
minValue: 0
value: 400
maxValue: 3
minValue: 3
value: 3
isCore: 1
- name: Move Range
id: MVR
description:
maxValue: 4
minValue: 4
value: 4
isCore: 1
- name: Move Height
id: MVH
description:
maxValue: 2
minValue: 2
value: 2
isCore: 1
- name: Attack Range
id: ATR
description:
maxValue: 3
minValue: 3
value: 3
isCore: 1
- name: AttackHeight
id: ATH
description:
maxValue: 2
minValue: 2
value: 2
isCore: 1
tags:
- Espada
Expand Down Expand Up @@ -69,3 +83,46 @@ MonoBehaviour:
- {fileID: 11400000, guid: bac31a58c9f786c4a9d5b67034ba5482, type: 2}
teams:
- {fileID: 11400000, guid: c7870a66a01c2a54e90fa9d468b19807, type: 2}
_TRPGOptions:
_gameType: 0
_turnType: 0
_healthAttribute:
name: Health
id: HP
description:
maxValue: 3
minValue: 3
value: 3
isCore: 1
_moveRange:
name: Move Range
id: MVR
description:
maxValue: 4
minValue: 4
value: 4
isCore: 1
_moveHeight:
name: Move Height
id: MVH
description:
maxValue: 2
minValue: 2
value: 2
isCore: 1
_attackRange:
name: Attack Range
id: ATR
description:
maxValue: 3
minValue: 3
value: 3
isCore: 1
_attackHeight:
name: Attack Range
id: ATR
description:
maxValue: 3
minValue: 3
value: 3
isCore: 1
3 changes: 2 additions & 1 deletion Assets/TRPGMaker/Database/Teams/NewTeam.asset
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ MonoBehaviour:
name: NewTeam
id: 0
characters:
- {fileID: 11400000, guid: 36a63a88f336fee4fbee3ca4e3812861, type: 2}
- {fileID: 11400000, guid: caa5b8cc4b5205b4297289922d3b7e33, type: 2}
- {fileID: 11400000, guid: 75942776545ea02418c221a9273f406b, type: 2}
playable: 1
2 changes: 1 addition & 1 deletion Assets/TRPGMaker/Database/Teams/NewTeam.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Assets/TRPGMaker/Editor/CharacterEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,6 @@ public override void OnInspectorGUI()

EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(serializedObject.FindProperty("name"), new GUIContent("Name: "), GUILayout.MinWidth(100));
EditorGUILayout.PropertyField(serializedObject.FindProperty("distance"), new GUIContent("Distance: "), GUILayout.MinWidth(100));
EditorGUILayout.PropertyField(serializedObject.FindProperty("height"), new GUIContent("Height: "), GUILayout.MinWidth(100));
EditorGUILayout.PropertyField(serializedObject.FindProperty("attackRange"), new GUIContent("Attack Range: "), GUILayout.MinWidth(100));

if (EditorGUI.EndChangeCheck())
{
Expand Down
17 changes: 17 additions & 0 deletions Assets/TRPGMaker/Editor/DatabaseEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,22 @@ public override void OnInspectorGUI()
GUILayout.EndHorizontal();
}
GUILayout.EndVertical();

// Teams
GUILayout.BeginVertical("Box");
GUI.Label(new Rect(EditorGUILayout.GetControlRect().x, EditorGUILayout.GetControlRect().y, EditorGUILayout.GetControlRect().width, 30), "Teams:", titleStyle);
for (int i = 0; i < Database.Instance.teams.Count; i++)
{
Team team = Database.Instance.teams[i];
// Changing line color
if (i % 2 == 0)
GUILayout.BeginHorizontal(gsLinePair);
else
GUILayout.BeginHorizontal(gsLineOdd);
Rect rect = EditorGUILayout.GetControlRect();
GUI.Label(rect, team.name);
GUILayout.EndHorizontal();
}
GUILayout.EndVertical();
}
}
3 changes: 2 additions & 1 deletion Assets/TRPGMaker/Editor/TeamEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ public override void OnInspectorGUI()
EditorGUILayout.PropertyField(serializedObject.FindProperty("id"), new GUIContent("Id: "), GUILayout.MinWidth(100));
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(serializedObject.FindProperty("name"), new GUIContent("Name: "), GUILayout.MinWidth(100));
EditorGUILayout.PropertyField(serializedObject.FindProperty("playable"), new GUIContent("Playable: "), GUILayout.MinWidth(100));
if (EditorGUI.EndChangeCheck())
{
AssetDatabase.RenameAsset(AssetDatabase.GetAssetPath((SpecializedClass)target), ((Team)target).name + ".asset");
AssetDatabase.RenameAsset(AssetDatabase.GetAssetPath((Team)target), ((Team)target).name + ".asset");
}
listCharacters.DoLayoutList();
serializedObject.ApplyModifiedProperties();
Expand Down
10 changes: 10 additions & 0 deletions Assets/TRPGMaker/Editor/Windows/Battle.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dddf04e

Please sign in to comment.