From 067d9ff6a632b7a38c544677fe23aa4763cff3fd Mon Sep 17 00:00:00 2001 From: francois Date: Fri, 16 Mar 2018 01:49:07 +0100 Subject: [PATCH] Resolution bug du aux inputs Design HUD -> Prefab --- Assets/Font/typo-stratum/__MACOSX.meta | 10 + .../Resources/Images/drapeau_rouge_80x60.png | Bin 0 -> 662 bytes .../Images/drapeau_rouge_80x60.png.meta | 77 + .../Resources/Images/drapeau_vert_80x60.png | Bin 0 -> 663 bytes .../Images/drapeau_vert_80x60.png.meta | 77 + Assets/Resources/Prefab/HUDGuiPanel.prefab | 1158 ++++++++++ .../Resources/Prefab/HUDGuiPanel.prefab.meta | 10 + Assets/Scenes/Menus.unity | 1977 +---------------- Assets/Scripts/LaunchGameScript.cs | 13 +- Assets/Scripts/SelectorBehavior.cs | 13 +- Assets/StreamingAssets/highscores.json | 2 +- ProjectSettings/InputManager.asset | 48 +- 12 files changed, 1449 insertions(+), 1936 deletions(-) create mode 100644 Assets/Font/typo-stratum/__MACOSX.meta create mode 100644 Assets/Resources/Images/drapeau_rouge_80x60.png create mode 100644 Assets/Resources/Images/drapeau_rouge_80x60.png.meta create mode 100644 Assets/Resources/Images/drapeau_vert_80x60.png create mode 100644 Assets/Resources/Images/drapeau_vert_80x60.png.meta create mode 100644 Assets/Resources/Prefab/HUDGuiPanel.prefab create mode 100644 Assets/Resources/Prefab/HUDGuiPanel.prefab.meta diff --git a/Assets/Font/typo-stratum/__MACOSX.meta b/Assets/Font/typo-stratum/__MACOSX.meta new file mode 100644 index 0000000..5596957 --- /dev/null +++ b/Assets/Font/typo-stratum/__MACOSX.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 76087783dd84b37478e6ad0446da7f2c +folderAsset: yes +timeCreated: 1520975305 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Images/drapeau_rouge_80x60.png b/Assets/Resources/Images/drapeau_rouge_80x60.png new file mode 100644 index 0000000000000000000000000000000000000000..e5f5a3045f9b8fb4c83f5a550c32c2e6beb45591 GIT binary patch literal 662 zcmeAS@N?(olHy`uVBq!ia0vp^0YGfS!3HEhs@wJeDVAa<&kznEsNqQI0P;BtJR*yM z>aT+^qm#z$3ZS55iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$QVa}C!k#XU zAr*7p-d^aZ94ON8@IM37_Je_^wM#ZdvMOqbG_^Z4Meh}2pVY2!a6-co!AsK|3?y_? z&ZZe|P%H>LAfT{Cw(8xPy~eitv#mY-_nq0YeXnF-=$?zSJ8T{97CR*KWt?H`wOnAx zZek`{-LS8AdZb)rVw1O(%)}Q}-jil)PZm4npTIk#uJYRyxwj&Mml^-ayvsdZ@^!(Z zm2G1Gh2;3Ae`hW@aJ}oWYV6kr-p13b`8FgLR6b>{<9#Q0qtY^O?VF2EA@`iDCX40X zblS;uO|qw)KS%k@#jCszmTlR|B>s;_=4p?x*~=HDA0o9hWD?Zw2htEB^pEc&rvw!~Us>O+d*9VIKI)|GJJd;p9@qzngUtGU% zO67hRoe2ifw_+N#>-|$iPR#nl*QRAYbst;g>{a)tW=o{($vxZVaO}SLI?I%r1AD$t zXy15TGs>!=^8EixGRNf>XS`&*ro(RXtl^l!Orl=+K zJ3sjHbz{*X`)`kVuk0_$`}%7}$ApasgpI%4@cw9L=^?p6ZD}Rvbqy5b|1&Z+?9#W- Td~*?)h8R3u{an^LB{Ts5GshK; literal 0 HcmV?d00001 diff --git a/Assets/Resources/Images/drapeau_rouge_80x60.png.meta b/Assets/Resources/Images/drapeau_rouge_80x60.png.meta new file mode 100644 index 0000000..7549e4f --- /dev/null +++ b/Assets/Resources/Images/drapeau_rouge_80x60.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 6fa5fa79fd745e244b9557592d9ee365 +timeCreated: 1521160991 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Images/drapeau_vert_80x60.png b/Assets/Resources/Images/drapeau_vert_80x60.png new file mode 100644 index 0000000000000000000000000000000000000000..5b07e827fc0932c64ecee7a9fba379c9d253d249 GIT binary patch literal 663 zcmeAS@N?(olHy`uVBq!ia0vp^0YGfS!3HEhs@wJeDVAa<&kznEsNqQI0P;BtJR*yM z>aT+^qm#z$3ZS55iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$QVa}CBAzae zAr*7p-rk)j94OH6uzn7&0B7SRg-b#1B5QVSH6!A^R&N$=Wx!u#wznFY|dU9ltm&@ntnzjw!nF1miw74Bo z8CU2qObuPio{{x;cFe9n&C3s*SACdJU@kj--pfTt9z8$c9-s1b%i-t;CvPqkUZ5@- zU0rIWWpQh#57RZ~n+hL)H3jc)xEIu}t9{;M_WH);Yf|UdFwEY6T;|&DO?PFzF8>vq z=6m2}EaSZ8g7>|ht60y7wtwN9q0RP^a|8RHq)&Z!t{hVQ%b?cR{{8Z@kUNJ2mdGF2 z{Owgq3g;!+1V84=-<#KLGi{GPaK~oCY0>$+oOj+k_Uj#Ev9Tl9>z*B#kL~);`(Vw| zBfVyF$KT|gSyS4+X`0&}2D2G4tIn$0#aKV|m43a8eGaGI`&T-jKRs?X$x5!>-cWq- zZ}VG&@`kVnMRg3Vv%jv(NoLV|&R)P|zP9y!Of}P==%d^I>}3}FzxIfBLg9`%<_^XM zmi`UaK_Aa>#hg1|{?O&Vlw1XqNfaXdSQl(!2oY;Ig%YR;!I{1XT>jtL$j8pAHglHe zfxqo<6l%_H7v}L>|7qV7AK#gOR*N?%TzdPt;!a}ef4TQUX6&ZiFH|Q_->@9Tz`u+y Y*4().text = "Launching..."; + Title.GetComponentInChildren().text = "Launching..."; new WaitForSeconds(2); GameManager.Instance.SetSkins( PlayerOneSelector.GetComponent().CurrentTransportIndex, @@ -54,6 +55,6 @@ public class LaunchGameScript : MonoBehaviour public void SelectionChanged() { Update(); - + } } diff --git a/Assets/Scripts/SelectorBehavior.cs b/Assets/Scripts/SelectorBehavior.cs index 8679c2b..b879edb 100644 --- a/Assets/Scripts/SelectorBehavior.cs +++ b/Assets/Scripts/SelectorBehavior.cs @@ -65,11 +65,10 @@ public class SelectorBehavior : BaseInputBehavior //public int InputDelay = 200; public int Padding; public Transform TransportsPanel; - public Color NormalColor = new Color(235, 239, 179, 255); + public Color NormalColor ; //public Transform PlayerPanel; public Sprite SelectorImage; public Color SelectorColor; - public Sprite SelectionImage; public string XAxisName { get { return !Player2 ? GameManager.Instance.XAxisP1 : GameManager.Instance.XAxisP2; } @@ -84,7 +83,7 @@ public class SelectorBehavior : BaseInputBehavior } public string CancelButtonName { - get { return !Player2 ? GameManager.Instance.CancelP2 : GameManager.Instance.CancelP2; } + get { return !Player2 ? GameManager.Instance.CancelP1 : GameManager.Instance.CancelP2; } } #endregion @@ -93,7 +92,6 @@ public class SelectorBehavior : BaseInputBehavior void Start() { selectionLock = new object(); - lastInput = DateTime.Now.AddSeconds(1.5); //3E00FFFF InitGameObjectImage(); } @@ -111,6 +109,12 @@ public class SelectorBehavior : BaseInputBehavior { HandleInputs(); } + + private void Awake() + { + Selected = false; + lastInput = DateTime.Now.AddMilliseconds(InputDelay); + } #endregion private void InitGameObjectImage() @@ -176,6 +180,7 @@ public class SelectorBehavior : BaseInputBehavior if (!string.IsNullOrEmpty(YAxisName) && !Selected) { var verticalAxis = Input.GetAxis(YAxisName); + Debug.Log(" "+Input.GetAxis(YAxisName)); if (Math.Abs(verticalAxis) == 1) { bool? move = IsPositiveMove(verticalAxis); diff --git a/Assets/StreamingAssets/highscores.json b/Assets/StreamingAssets/highscores.json index 74b79ba..3601318 100644 --- a/Assets/StreamingAssets/highscores.json +++ b/Assets/StreamingAssets/highscores.json @@ -1 +1 @@ -{"Items":[{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"},{"pseudo":"Tata","transport":0,"timeStr":"0:30:30"},{"pseudo":"Titi","transport":0,"timeStr":"0:30:30"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"}]} +{"Items":[{"pseudo":"QRJROM","transport":0,"timeStr":"0:28:20"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"},{"pseudo":"Tata","transport":0,"timeStr":"0:30:30"},{"pseudo":"Titi","transport":0,"timeStr":"0:30:30"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"},{"pseudo":"Toto","transport":0,"timeStr":"0:30:30"}]} diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset index 708b661..87f2029 100644 --- a/ProjectSettings/InputManager.asset +++ b/ProjectSettings/InputManager.asset @@ -229,6 +229,22 @@ InputManager: type: 0 axis: 1 joyNum: 0 + - serializedVersion: 3 + m_Name: VerticalP2 + descriptiveName: + descriptiveNegativeName: + negativeButton: up + positiveButton: down + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 1 + invert: 0 + type: 0 + axis: 1 + joyNum: 0 - serializedVersion: 3 m_Name: HorizontalP2 descriptiveName: @@ -309,35 +325,3 @@ InputManager: type: 0 axis: 1 joyNum: 0 - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: General horizontal for all joystick - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 3 - dead: 0.001 - sensitivity: 3 - snap: 1 - invert: 0 - type: 2 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: General vertical for all joystick - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 3 - dead: 0.001 - sensitivity: 3 - snap: 1 - invert: 0 - type: 2 - axis: 1 - joyNum: 0