all repos — RPG @ 39e7f8bd4adbfecce5a88f76fa1cd9cbb0f243f1

Fully functional 3D turn based role playing game coded in C# and base Unity.

add gold display in overworld
Marco Andronaco andronacomarco@gmail.com
Thu, 16 Apr 2020 00:34:47 +0200
commit

39e7f8bd4adbfecce5a88f76fa1cd9cbb0f243f1

parent

53bc27fededf9e41b98fb5249608168b93ceda09

M Assets/Prefabs/UI/Overworld_GUI.prefabAssets/Prefabs/UI/Overworld_GUI.prefab

@@ -1,5 +1,84 @@

%YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &424479514654739747 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7602918085386552020} + - component: {fileID: 5977608266296176740} + - component: {fileID: 6418929602587015906} + m_Layer: 5 + m_Name: txt_gold + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7602918085386552020 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 424479514654739747} + 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: 6787417573203273024} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 106.20001, y: 417.04004} + m_SizeDelta: {x: 187.5, y: 88.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5977608266296176740 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 424479514654739747} + m_CullTransparentMesh: 0 +--- !u!114 &6418929602587015906 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 424479514654739747} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0.976174, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: a532237bcf572d34598c67906644e7d6, type: 3} + m_FontSize: 55 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 100 + m_Alignment: 5 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 9999g --- !u!1 &918699236333170125 GameObject: m_ObjectHideFlags: 0

@@ -8191,7 +8270,7 @@ m_LocalScale: {x: 1, y: 1, z: 1}

m_Children: - {fileID: 6787417573451246426} m_Father: {fileID: 6787417573203273024} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}

@@ -12203,7 +12282,7 @@ m_LocalScale: {x: 1, y: 1, z: 1}

m_Children: - {fileID: 6787417573123371311} m_Father: {fileID: 6787417573203273024} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}

@@ -12336,7 +12415,7 @@ m_LocalScale: {x: 1, y: 1, z: 1}

m_Children: - {fileID: 6787417573943789450} m_Father: {fileID: 6787417573203273024} - m_RootOrder: 6 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}

@@ -12708,7 +12787,7 @@ m_LocalScale: {x: 1, y: 1, z: 1}

m_Children: - {fileID: 6787417573187220568} m_Father: {fileID: 6787417573203273024} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}

@@ -13862,7 +13941,7 @@ m_RootOrder: 4

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -80.6, y: 21.957031} + m_AnchoredPosition: {x: -80.6001, y: 21.957031} m_SizeDelta: {x: -1287.9, y: -130.8} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6787417573124403277

@@ -14658,6 +14737,7 @@ m_LocalPosition: {x: 0, y: 0, z: 0}

m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 6787417573652664328} + - {fileID: 7602918085386552020} - {fileID: 6787417573348002134} - {fileID: 6787417572939953770} - {fileID: 6787417572534730536}

@@ -15692,7 +15772,7 @@ m_LocalScale: {x: 1, y: 1, z: 1}

m_Children: - {fileID: 6787417572318396886} m_Father: {fileID: 6787417573203273024} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}

@@ -16632,7 +16712,7 @@ m_RootOrder: 5

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -80.600006, y: 21.957031} + m_AnchoredPosition: {x: -80.6001, y: 21.957031} m_SizeDelta: {x: -1287.8999, y: -130.81} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6787417573460627133

@@ -17381,7 +17461,7 @@ m_LocalScale: {x: 1, y: 1, z: 1}

m_Children: - {fileID: 6787417573895871785} m_Father: {fileID: 6787417573203273024} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}

@@ -18812,8 +18892,8 @@ m_RootOrder: 0

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -78, y: 417.03998} - m_SizeDelta: {x: 223, y: 88.2} + m_AnchoredPosition: {x: -88.5, y: 417.03998} + m_SizeDelta: {x: 201.9, y: 88.2} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6787417573652664334 CanvasRenderer:

@@ -19622,7 +19702,7 @@ m_LocalScale: {x: 1, y: 1, z: 1}

m_Children: - {fileID: 6787417571979954234} m_Father: {fileID: 6787417573203273024} - m_RootOrder: 7 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}

@@ -19801,7 +19881,7 @@ m_RootOrder: 1

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 38.925, y: 135.75} + m_AnchoredPosition: {x: 38.924805, y: 135.75} m_SizeDelta: {x: -1048.9, y: -358.5} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6787417573732253387

@@ -22413,11 +22493,6 @@ type: 3}

propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} - - target: {fileID: 5261656949916970799, guid: 71cec3b855e82c341b4e01189cd89f56, - type: 3} - propertyPath: ui - value: - objectReference: {fileID: 0} - target: {fileID: 5261656949916970792, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} propertyPath: m_LocalPosition.x

@@ -22523,12 +22598,22 @@ type: 3}

propertyPath: m_Pivot.y value: 0.5 objectReference: {fileID: 0} - - target: {fileID: 5261656949991723711, guid: 71cec3b855e82c341b4e01189cd89f56, + - target: {fileID: 5261656949916970799, guid: 71cec3b855e82c341b4e01189cd89f56, + type: 3} + propertyPath: ui + value: + objectReference: {fileID: 0} + - target: {fileID: 5261656950194078395, guid: 71cec3b855e82c341b4e01189cd89f56, + type: 3} + propertyPath: m_AnchorMin.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5261656950194078395, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} propertyPath: m_AnchorMax.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 5261656949991723711, guid: 71cec3b855e82c341b4e01189cd89f56, + - target: {fileID: 5261656950194078395, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} propertyPath: m_AnchorMax.y value: 1

@@ -22548,37 +22633,32 @@ type: 3}

propertyPath: m_AnchorMax.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 5261656949847048307, guid: 71cec3b855e82c341b4e01189cd89f56, + - target: {fileID: 5261656949841184210, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} propertyPath: m_AnchorMax.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 5261656949847048307, guid: 71cec3b855e82c341b4e01189cd89f56, + - target: {fileID: 5261656949841184210, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} propertyPath: m_AnchorMax.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 5261656950194078395, guid: 71cec3b855e82c341b4e01189cd89f56, - type: 3} - propertyPath: m_AnchorMin.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 5261656950194078395, guid: 71cec3b855e82c341b4e01189cd89f56, + - target: {fileID: 5261656949847048307, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} propertyPath: m_AnchorMax.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 5261656950194078395, guid: 71cec3b855e82c341b4e01189cd89f56, + - target: {fileID: 5261656949847048307, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} propertyPath: m_AnchorMax.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 5261656948929655722, guid: 71cec3b855e82c341b4e01189cd89f56, + - target: {fileID: 5261656949991723711, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} propertyPath: m_AnchorMax.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 5261656948929655722, guid: 71cec3b855e82c341b4e01189cd89f56, + - target: {fileID: 5261656949991723711, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} propertyPath: m_AnchorMax.y value: 1

@@ -22598,27 +22678,27 @@ type: 3}

propertyPath: m_AnchorMax.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 5261656949841184210, guid: 71cec3b855e82c341b4e01189cd89f56, + - target: {fileID: 5261656948735555033, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} - propertyPath: m_AnchorMax.x + propertyPath: m_AnchorMin.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 5261656949841184210, guid: 71cec3b855e82c341b4e01189cd89f56, + - target: {fileID: 5261656948735555033, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} - propertyPath: m_AnchorMax.y + propertyPath: m_AnchorMax.x value: 1 objectReference: {fileID: 0} - target: {fileID: 5261656948735555033, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} - propertyPath: m_AnchorMin.x + propertyPath: m_AnchorMax.y value: 1 objectReference: {fileID: 0} - - target: {fileID: 5261656948735555033, guid: 71cec3b855e82c341b4e01189cd89f56, + - target: {fileID: 5261656948929655722, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} propertyPath: m_AnchorMax.x value: 1 objectReference: {fileID: 0} - - target: {fileID: 5261656948735555033, guid: 71cec3b855e82c341b4e01189cd89f56, + - target: {fileID: 5261656948929655722, guid: 71cec3b855e82c341b4e01189cd89f56, type: 3} propertyPath: m_AnchorMax.y value: 1
M Assets/Scenes/Level0.unityAssets/Scenes/Level0.unity

@@ -17020,6 +17020,7 @@ - {fileID: 1044991107}

- {fileID: 1855510960} - {fileID: 1886718718} - {fileID: 979953280} + goldText: {fileID: 6787417573422268988} desc_text: {fileID: 0} --- !u!114 &1894257713 MonoBehaviour:

@@ -18144,7 +18145,7 @@ objectReference: {fileID: 1894257712}

- target: {fileID: 6787417573732253397, guid: b9089e56c5ff80b419c7f4aba9c5c421, type: 3} propertyPath: m_AnchoredPosition.x - value: 38.92505 + value: 38.925293 objectReference: {fileID: 0} - target: {fileID: 6787417573124403279, guid: b9089e56c5ff80b419c7f4aba9c5c421, type: 3}

@@ -18283,6 +18284,18 @@ value: 0

objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: b9089e56c5ff80b419c7f4aba9c5c421, type: 3} +--- !u!114 &6787417573422268988 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 6418929602587015906, guid: b9089e56c5ff80b419c7f4aba9c5c421, + type: 3} + m_PrefabInstance: {fileID: 6787417573422268987} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &7395845758018998446 GameObject: m_ObjectHideFlags: 0
M Assets/Scenes/Level1.unityAssets/Scenes/Level1.unity

@@ -611,6 +611,18 @@ m_CorrespondingSourceObject: {fileID: 6787417573732253398, guid: b9089e56c5ff80b419c7f4aba9c5c421,

type: 3} m_PrefabInstance: {fileID: 6787417573422268987} m_PrefabAsset: {fileID: 0} +--- !u!114 &824452564 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 6418929602587015906, guid: b9089e56c5ff80b419c7f4aba9c5c421, + type: 3} + m_PrefabInstance: {fileID: 6787417573422268987} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!114 &963634863 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 4840711255217836516, guid: bdae76ea51c4ec04c91ecf9c9cfc7889,

@@ -933,6 +945,7 @@ - {fileID: 1044991107}

- {fileID: 1855510960} - {fileID: 1886718718} - {fileID: 979953280} + goldText: {fileID: 824452564} desc_text: {fileID: 0} --- !u!114 &1894257713 MonoBehaviour:
M Assets/Scripts/Overworld/OverworldUIManager.csAssets/Scripts/Overworld/OverworldUIManager.cs

@@ -22,6 +22,7 @@ [SerializeField] private GameObject partyObject = null;

[SerializeField] private List<GoodGuy> party; [SerializeField] private GameObject pause_panel = null; [SerializeField] private GameObject[] panel = null; + [SerializeField] private Text goldText = null; public Text desc_text = null; public enum Panel {

@@ -53,6 +54,7 @@ }

void Start() { gm = GameMaster.Instance; + goldText.text = gm.gold + "g"; sm = panel[(int)Panel.Settings].GetComponent<SettingsManager>(); desc_text = panel[(int)Panel.Description].GetComponentInChildren<Text>();

@@ -134,7 +136,7 @@ }

} private void handleInventory() - { + { //get inventory buttons object Transform tmp = panel[(int)Panel.Inventory].transform.GetChild(1);