Resolution bug du aux inputs
Design HUD -> Prefab
This commit is contained in:
parent
71be19ad98
commit
067d9ff6a6
10
Assets/Font/typo-stratum/__MACOSX.meta
Normal file
10
Assets/Font/typo-stratum/__MACOSX.meta
Normal file
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76087783dd84b37478e6ad0446da7f2c
|
||||
folderAsset: yes
|
||||
timeCreated: 1520975305
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Images/drapeau_rouge_80x60.png
Normal file
BIN
Assets/Resources/Images/drapeau_rouge_80x60.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 662 B |
77
Assets/Resources/Images/drapeau_rouge_80x60.png.meta
Normal file
77
Assets/Resources/Images/drapeau_rouge_80x60.png.meta
Normal file
@ -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:
|
BIN
Assets/Resources/Images/drapeau_vert_80x60.png
Normal file
BIN
Assets/Resources/Images/drapeau_vert_80x60.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 663 B |
77
Assets/Resources/Images/drapeau_vert_80x60.png.meta
Normal file
77
Assets/Resources/Images/drapeau_vert_80x60.png.meta
Normal file
@ -0,0 +1,77 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6bbb59e48c0e85341a010b3229002fdf
|
||||
timeCreated: 1521160990
|
||||
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:
|
1158
Assets/Resources/Prefab/HUDGuiPanel.prefab
Normal file
1158
Assets/Resources/Prefab/HUDGuiPanel.prefab
Normal file
File diff suppressed because it is too large
Load Diff
10
Assets/Resources/Prefab/HUDGuiPanel.prefab.meta
Normal file
10
Assets/Resources/Prefab/HUDGuiPanel.prefab.meta
Normal file
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ff612e4aca9ee264abcb6222d1827faa
|
||||
timeCreated: 1521161235
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -5,12 +5,12 @@ public class LaunchGameScript : MonoBehaviour
|
||||
{
|
||||
public GameObject PlayerOneSelector;
|
||||
public GameObject PlayerTwoSelector;
|
||||
public GameObject GoButton;
|
||||
public Text Title;
|
||||
private static LaunchGameScript _current;
|
||||
public static LaunchGameScript Current { get { return _current; } }
|
||||
|
||||
public bool Launching { get; set; }
|
||||
|
||||
|
||||
public bool CanWeGo
|
||||
{
|
||||
get
|
||||
@ -34,14 +34,15 @@ public class LaunchGameScript : MonoBehaviour
|
||||
private void Update()
|
||||
{
|
||||
var go = CanWeGo;
|
||||
if (GoButton != null && go != GoButton.activeSelf)
|
||||
if (Title != null && go != Title.gameObject.activeSelf)
|
||||
{
|
||||
GoButton.SetActive(go);
|
||||
Title.text = "Choisissez votre véhicule";
|
||||
return;
|
||||
}
|
||||
Title.text = "Pour demarrer, appuyer sur les boutons valider en meme temps";
|
||||
if (Input.GetButton("SubmitP1") && Input.GetButton("SubmitP2") && go)
|
||||
{
|
||||
GoButton.GetComponentInChildren<Text>().text = "Launching...";
|
||||
Title.GetComponentInChildren<Text>().text = "Launching...";
|
||||
new WaitForSeconds(2);
|
||||
GameManager.Instance.SetSkins(
|
||||
PlayerOneSelector.GetComponent<SelectorBehavior>().CurrentTransportIndex,
|
||||
@ -54,6 +55,6 @@ public class LaunchGameScript : MonoBehaviour
|
||||
public void SelectionChanged()
|
||||
{
|
||||
Update();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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"}]}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user