From cd56a3a21bf5b6c8c8de09a0e674aa2a15167786 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sun, 28 Jun 2020 22:36:45 -0400 Subject: [PATCH] - Fixed bluff tokens having name fields - Fixed helper tokens drawing under role tokens --- Assets/Scenes/GrimoireScene.unity | 46 +++++++++++++++++++++++++++---- Assets/Scripts/GrimoireManager.cs | 4 +-- Assets/Scripts/GrimoireToken.cs | 9 ++++++ Assets/Scripts/HelperToken.cs | 2 +- 4 files changed, 53 insertions(+), 8 deletions(-) diff --git a/Assets/Scenes/GrimoireScene.unity b/Assets/Scenes/GrimoireScene.unity index da3633d..2c42e97 100644 --- a/Assets/Scenes/GrimoireScene.unity +++ b/Assets/Scenes/GrimoireScene.unity @@ -1927,8 +1927,8 @@ MonoBehaviour: ContextMenuPrefab: {fileID: 11433316, guid: e3ac8d34da2d71c48bce3808dbb04409, type: 3} RoleTokenAttach: {fileID: 763230963} HelperTokenAttach: {fileID: 1970541123} + HelperTokenFreeTransform: {fileID: 1077086681} BluffTokenAttach: {fileID: 1595591120} - AlignmentTokenAttach: {fileID: 0} HoverImage: {fileID: 1147585650} RoleScaleSlider: {fileID: 1966428203141695017} HelperScaleSlider: {fileID: 1966428202172496131} @@ -4187,7 +4187,7 @@ RectTransform: m_Children: - {fileID: 234409207} m_Father: {fileID: 1740795181} - m_RootOrder: 8 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -10656,6 +10656,41 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1051836408} m_CullTransparentMesh: 0 +--- !u!1 &1077086681 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1077086682} + m_Layer: 5 + m_Name: HelperTokenFreeTransform + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1077086682 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1077086681} + 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: 1740795181} + 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} + m_AnchoredPosition: {x: -0.000061035156, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1085039423 GameObject: m_ObjectHideFlags: 0 @@ -11102,7 +11137,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1740795181} - 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} @@ -15828,6 +15863,7 @@ RectTransform: - {fileID: 763230964} - {fileID: 1970541124} - {fileID: 1595591121} + - {fileID: 1077086682} - {fileID: 1957039011} - {fileID: 1147585649} - {fileID: 387258122} @@ -16746,7 +16782,7 @@ RectTransform: - {fileID: 740535600} - {fileID: 1244910099} m_Father: {fileID: 1740795181} - 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} @@ -17119,7 +17155,7 @@ RectTransform: - {fileID: 880482579} - {fileID: 1103299348} m_Father: {fileID: 1740795181} - m_RootOrder: 9 + m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} diff --git a/Assets/Scripts/GrimoireManager.cs b/Assets/Scripts/GrimoireManager.cs index 1504b96..3867291 100644 --- a/Assets/Scripts/GrimoireManager.cs +++ b/Assets/Scripts/GrimoireManager.cs @@ -21,8 +21,8 @@ public class GrimoireManager : MonoBehaviour, IPointerClickHandler public GameObject RoleTokenAttach; public GameObject HelperTokenAttach; + public GameObject HelperTokenFreeTransform; public GameObject BluffTokenAttach; - public GameObject AlignmentTokenAttach; public Image HoverImage; @@ -326,7 +326,7 @@ public void SetPlayerNamesVisible(bool visible) PlayerNamesVisible = visible; foreach (var token in RoleTokens) { - token.NameText.gameObject.SetActive(visible); + token.SetPlayerNameVisible(visible); } } diff --git a/Assets/Scripts/GrimoireToken.cs b/Assets/Scripts/GrimoireToken.cs index d463bef..5747872 100644 --- a/Assets/Scripts/GrimoireToken.cs +++ b/Assets/Scripts/GrimoireToken.cs @@ -215,6 +215,15 @@ public void SetIsBluffToken() { IsBluffToken = true; GetComponentInChildren