ui
This commit is contained in:
parent
0173e11331
commit
d8c5957971
@ -1121,18 +1121,24 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 30400d87b462847298c93b5dc0412288, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
flags:
|
||||
flagsP1:
|
||||
- {fileID: 35645305}
|
||||
- {fileID: 1931271911}
|
||||
flagsP2:
|
||||
- {fileID: 35645304}
|
||||
- {fileID: 67179737}
|
||||
highScores:
|
||||
- {fileID: 1714708925}
|
||||
- {fileID: 1010512803}
|
||||
transportsP1:
|
||||
- {fileID: 1311300793}
|
||||
- {fileID: 2096817680}
|
||||
transportsP2:
|
||||
- {fileID: 1800970477}
|
||||
- {fileID: 545581399}
|
||||
chronos:
|
||||
- {fileID: 35645303}
|
||||
- {fileID: 46136836}
|
||||
firsts:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
tachometersP1:
|
||||
- {fileID: 35645302}
|
||||
- {fileID: 46136841}
|
||||
@ -1260,7 +1266,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.16862746, g: 0.6901961, b: 0, a: 1}
|
||||
m_Color: {r: 1, g: 0.19607843, b: 0, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
@ -1743,6 +1749,11 @@ Prefab:
|
||||
propertyPath: InputDelay
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114387664711548092, guid: d5df03a0612222947a30c5be4549acdb,
|
||||
type: 2}
|
||||
propertyPath: Player2
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: d5df03a0612222947a30c5be4549acdb, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
@ -1825,6 +1836,80 @@ CanvasRenderer:
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 484981402}
|
||||
--- !u!1 &494702545
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 494702546}
|
||||
- component: {fileID: 494702548}
|
||||
- component: {fileID: 494702547}
|
||||
m_Layer: 0
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &494702546
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 494702545}
|
||||
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: 1805432776}
|
||||
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: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &494702547
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 494702545}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.92156863, g: 0.91764706, b: 0.7019608, 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: 0c90228a5041e3e46870c5be76316d08, type: 3}
|
||||
m_FontSize: 120
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 1
|
||||
m_MaxSize: 120
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 1
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: Chargement...
|
||||
--- !u!222 &494702548
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 494702545}
|
||||
--- !u!1 &516481040
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2075,6 +2160,11 @@ Prefab:
|
||||
propertyPath: InputDelay
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114387664711548092, guid: d5df03a0612222947a30c5be4549acdb,
|
||||
type: 2}
|
||||
propertyPath: Player2
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: d5df03a0612222947a30c5be4549acdb, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
@ -2177,7 +2267,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &552954449
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2235,7 +2325,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 0.19607845, b: 0, a: 1}
|
||||
m_Color: {r: 0.19607843, g: 0.78431374, b: 0, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
@ -2452,6 +2542,11 @@ Prefab:
|
||||
propertyPath: InputDelay
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114387664711548092, guid: d5df03a0612222947a30c5be4549acdb,
|
||||
type: 2}
|
||||
propertyPath: Player2
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: d5df03a0612222947a30c5be4549acdb, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
@ -3238,6 +3333,11 @@ Prefab:
|
||||
propertyPath: InputDelay
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114387664711548092, guid: d5df03a0612222947a30c5be4549acdb,
|
||||
type: 2}
|
||||
propertyPath: Player2
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: d5df03a0612222947a30c5be4549acdb, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
@ -3633,7 +3733,7 @@ MonoBehaviour:
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 8a697d283fb701b4a9a210c0e58f6a5e, type: 3}
|
||||
m_Font: {fileID: 12800000, guid: 0c90228a5041e3e46870c5be76316d08, type: 3}
|
||||
m_FontSize: 100
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
@ -4377,6 +4477,11 @@ Prefab:
|
||||
propertyPath: InputDelay
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114387664711548092, guid: d5df03a0612222947a30c5be4549acdb,
|
||||
type: 2}
|
||||
propertyPath: Player2
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: d5df03a0612222947a30c5be4549acdb, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
@ -4648,6 +4753,11 @@ Prefab:
|
||||
propertyPath: InputDelay
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114387664711548092, guid: d5df03a0612222947a30c5be4549acdb,
|
||||
type: 2}
|
||||
propertyPath: Player2
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: d5df03a0612222947a30c5be4549acdb, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
@ -5854,7 +5964,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 0.19607845, b: 0, a: 1}
|
||||
m_Color: {r: 0.19607843, g: 0.78431374, b: 0, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
@ -6278,7 +6388,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1708071943
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -6773,6 +6883,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_Children:
|
||||
- {fileID: 1416163764}
|
||||
- {fileID: 494702546}
|
||||
m_Father: {fileID: 1823713983}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@ -6858,7 +6969,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1823713983
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -7513,6 +7624,80 @@ CanvasRenderer:
|
||||
type: 2}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2042068602}
|
||||
--- !u!1 &2082426107
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 2082426108}
|
||||
- component: {fileID: 2082426110}
|
||||
- component: {fileID: 2082426109}
|
||||
m_Layer: 0
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2082426108
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2082426107}
|
||||
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: 2122916359}
|
||||
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: 0.000061035156, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2082426109
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2082426107}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.92156863, g: 0.91764706, b: 0.7019608, 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: 0c90228a5041e3e46870c5be76316d08, type: 3}
|
||||
m_FontSize: 120
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 1
|
||||
m_MaxSize: 120
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 1
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: Chargement...
|
||||
--- !u!222 &2082426110
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2082426107}
|
||||
--- !u!1 &2086638996
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -7647,18 +7832,19 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2122916359
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2122916358}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_Children:
|
||||
- {fileID: 1323907107}
|
||||
- {fileID: 2082426108}
|
||||
m_Father: {fileID: 1823713983}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -159,7 +159,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: fd3dd54012b3be2438dbc7f320e35e40, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
InputDelay: 200
|
||||
InputDelay: 300
|
||||
PlayerPanelImage: {fileID: 492428415}
|
||||
PlayerPanelText: {fileID: 2039829331}
|
||||
Player2: 1
|
||||
@ -3035,7 +3035,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!212 &985792713
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -4294,7 +4294,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: fd3dd54012b3be2438dbc7f320e35e40, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
InputDelay: 200
|
||||
InputDelay: 300
|
||||
PlayerPanelImage: {fileID: 977855010}
|
||||
PlayerPanelText: {fileID: 1118367624}
|
||||
Player2: 0
|
||||
@ -4302,7 +4302,7 @@ MonoBehaviour:
|
||||
TransportsPanel: {fileID: 2049240257}
|
||||
NormalColor: {r: 0.92156863, g: 0.91764706, b: 0.7019608, a: 1}
|
||||
SelectorImage: {fileID: 21300000, guid: 3ddf9f222b5ed674e81ad3d27f507f57, type: 3}
|
||||
SelectorColor: {r: 1, g: 0, b: 0, a: 1}
|
||||
SelectorColor: {r: 1, g: 0.19607843, b: 0, a: 1}
|
||||
--- !u!1 &1400122276
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5517,7 +5517,7 @@ Canvas:
|
||||
m_GameObject: {fileID: 1911201211}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_RenderMode: 2
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
@ -5537,7 +5537,7 @@ RectTransform:
|
||||
m_GameObject: {fileID: 1911201211}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.0112, y: 0.012, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1197051010}
|
||||
- {fileID: 1467378986}
|
||||
@ -5548,8 +5548,8 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 1600, y: 900}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1911201216
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1,5 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System;
|
||||
|
||||
public abstract class BaseInputBehavior : MonoBehaviour
|
||||
|
@ -24,15 +24,32 @@ public class GameManager : MonoBehaviour
|
||||
return new List<Sprite> {
|
||||
Resources.Load<Sprite>("Images/metro_80x80"),
|
||||
Resources.Load<Sprite>("Images/bus_80x80"),
|
||||
Resources.Load<Sprite>("Images/deambulateur_80x80"),
|
||||
Resources.Load<Sprite>("Images/monocycle_80x80"),
|
||||
Resources.Load<Sprite>("Images/voiture_80x80"),
|
||||
Resources.Load<Sprite>("Images/lapetiterennes_80x80"),
|
||||
Resources.Load<Sprite>("Images/toutenvelo_80x80"),
|
||||
Resources.Load<Sprite>("Images/monocycle_80x80"),
|
||||
Resources.Load<Sprite>("Images/deambulateur_80x80"),
|
||||
Resources.Load<Sprite>("Images/velopiste_80x80")
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public List<Sprite> Transports320
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<Sprite> {
|
||||
Resources.Load<Sprite>("Images/metro_320x320"),
|
||||
Resources.Load<Sprite>("Images/bus_320x320"),
|
||||
Resources.Load<Sprite>("Images/monocycle_320x320"),
|
||||
Resources.Load<Sprite>("Images/voiture_320x320"),
|
||||
Resources.Load<Sprite>("Images/lapetiterennes_320x320"),
|
||||
Resources.Load<Sprite>("Images/toutenvelo_320x320"),
|
||||
Resources.Load<Sprite>("Images/deambulateur_320x320"),
|
||||
Resources.Load<Sprite>("Images/velopiste_320x320")
|
||||
};
|
||||
}
|
||||
}
|
||||
public string GameSceneName = "GameScene";
|
||||
public string MenuSceneName = "Menus";
|
||||
|
||||
@ -249,10 +266,10 @@ public class GameManager : MonoBehaviour
|
||||
// Timer
|
||||
//yield return new WaitForSeconds(3f);
|
||||
hm.SetMessageActive(true);
|
||||
hm.SetMessage("Prêts ?");
|
||||
hm.SetMessage("PRETS ?");
|
||||
// Timer
|
||||
yield return new WaitForSeconds(2f);
|
||||
hm.SetMessage("Pédalez !");
|
||||
hm.SetMessage("PEDALEZ !");
|
||||
startTime = Time.time;
|
||||
hm.SetActiveChrono (true);
|
||||
_status = States.Race;
|
||||
@ -268,7 +285,7 @@ public class GameManager : MonoBehaviour
|
||||
if (winner == playerID) {
|
||||
hm.SetMessage ("Victoire !", playerID);
|
||||
} else {
|
||||
hm.SetMessage ("Arrivé !", playerID);
|
||||
hm.SetMessage ("Fini !", playerID);
|
||||
}
|
||||
// Timer
|
||||
yield return new WaitForSeconds(3f);
|
||||
@ -277,10 +294,13 @@ public class GameManager : MonoBehaviour
|
||||
|
||||
yield return new WaitForSeconds(2f);
|
||||
|
||||
if (playerID == 0)
|
||||
EntryP1.time = TimeSpan.FromSeconds(bm1.finishTime);
|
||||
else
|
||||
if (playerID == 0) {
|
||||
EntryP1.time = TimeSpan.FromSeconds (bm1.finishTime);
|
||||
EntryP1.transport = GetSkins (0);
|
||||
} else {
|
||||
EntryP2.time = TimeSpan.FromSeconds(bm2.finishTime);
|
||||
EntryP2.transport = GetSkins (1);
|
||||
}
|
||||
|
||||
hm.SetHighScore (playerID);
|
||||
}
|
||||
|
@ -6,10 +6,12 @@ using System;
|
||||
|
||||
public class HUDManager : MonoBehaviour {
|
||||
|
||||
public GameObject[] flags;
|
||||
public GameObject[] flagsP1;
|
||||
public GameObject[] flagsP2;
|
||||
public GameObject[] highScores;
|
||||
public Image[] transportsP1;
|
||||
public Image[] transportsP2;
|
||||
public Text[] chronos;
|
||||
public Text[] firsts;
|
||||
public Text[] tachometersP1;
|
||||
public Text[] tachometersP2;
|
||||
public Text[] maxSpeedsP1;
|
||||
@ -39,6 +41,10 @@ public class HUDManager : MonoBehaviour {
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
transportsP1[i].sprite = gm.Transports320 [gm.GetSkins (0)];
|
||||
transportsP2[i].sprite = gm.Transports320 [gm.GetSkins (1)];
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@ -48,17 +54,14 @@ public class HUDManager : MonoBehaviour {
|
||||
UpdateDistance ();
|
||||
UpdateChrono (0);
|
||||
UpdateChrono (1);
|
||||
UpdateFlags (0);
|
||||
UpdateFlags (1);
|
||||
// UpdateFirst (0);
|
||||
UpdateFlags ();
|
||||
}
|
||||
|
||||
void UpdateFirst(int bikeID) {
|
||||
firsts [bikeID].text = (gm.GetFirst () + 1).ToString();
|
||||
}
|
||||
|
||||
void UpdateFlags(int bikeID) {
|
||||
flags [bikeID].SetActive (gm.GetFirst () == bikeID);
|
||||
|
||||
void UpdateFlags() {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
flagsP1 [i].SetActive (gm.GetFirst () == 0);
|
||||
flagsP2 [i].SetActive (gm.GetFirst () == 1);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetActiveChrono(bool active) {
|
||||
@ -67,6 +70,10 @@ public class HUDManager : MonoBehaviour {
|
||||
}
|
||||
|
||||
void UpdateChrono(int bikeID) {
|
||||
if (gm.Status != States.Race) {
|
||||
chronos [bikeID].text = "00:00:00";
|
||||
return;
|
||||
}
|
||||
float time = gm.GetChrono ();
|
||||
TimeSpan timeSpan = TimeSpan.FromSeconds(time);
|
||||
chronos [bikeID].text = string.Format("{0:D2}:{1:D2}:{2:D2}", timeSpan.Minutes, timeSpan.Seconds, timeSpan.Milliseconds / 10);
|
||||
@ -110,7 +117,7 @@ public class HUDManager : MonoBehaviour {
|
||||
public void SetMessageActive(bool status, int playerID=2) {
|
||||
if (playerID > 1) {
|
||||
Messages [0].SetActive (status);
|
||||
// Messages[1].SetActive(status);
|
||||
Messages [1].SetActive(status);
|
||||
} else {
|
||||
Messages [playerID].SetActive (status);
|
||||
}
|
||||
@ -119,7 +126,7 @@ public class HUDManager : MonoBehaviour {
|
||||
public void SetMessage(string message, int playerID=2) {
|
||||
if (playerID > 1) {
|
||||
Messages [0].GetComponent<Text> ().text = message;
|
||||
// Messages[1].GetComponent<Text>().text = message;
|
||||
Messages [1].GetComponent<Text> ().text = message;
|
||||
} else {
|
||||
Messages [playerID].GetComponent<Text> ().text = message;
|
||||
}
|
||||
|
@ -11,8 +11,8 @@ public class HighscoreLetterManager : BaseInputBehavior
|
||||
{
|
||||
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
|
||||
"K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
|
||||
"U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3",
|
||||
"4", "5", "6", "7", "8", "9", " "
|
||||
"U", "V", "W", "X", "Y", "Z", " " //"0", "1", "2", "3",
|
||||
//"4", "5", "6", "7", "8", "9", " "
|
||||
};
|
||||
public bool IsActive
|
||||
{
|
||||
@ -30,6 +30,8 @@ public class HighscoreLetterManager : BaseInputBehavior
|
||||
}
|
||||
}
|
||||
|
||||
public bool disabled;
|
||||
|
||||
private int currentIndex;
|
||||
|
||||
public Button UpButton;
|
||||
@ -77,7 +79,7 @@ public class HighscoreLetterManager : BaseInputBehavior
|
||||
}
|
||||
}
|
||||
|
||||
public bool Player2 { get; internal set; }
|
||||
public bool Player2;
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
@ -93,7 +95,7 @@ public class HighscoreLetterManager : BaseInputBehavior
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (!IsActive) return;
|
||||
if (!IsActive || disabled) return;
|
||||
|
||||
UpdateLetter();
|
||||
if (!IsSpawned)
|
||||
@ -135,8 +137,8 @@ public class HighscoreLetterManager : BaseInputBehavior
|
||||
//upButtonImage.sprite = upSprite;
|
||||
//downButtonImage.sprite = downSprite;
|
||||
Debug.Log(transform.gameObject.name + " is " + (_isActive ? "active" : "inactive"));
|
||||
upButtonImage.gameObject.SetActive(_isActive);
|
||||
downButtonImage.gameObject.SetActive(_isActive);
|
||||
if(upButtonImage!=null)upButtonImage.gameObject.SetActive(_isActive);
|
||||
if(upButtonImage!=null)downButtonImage.gameObject.SetActive(_isActive);
|
||||
}
|
||||
|
||||
public void ChangeLetter(bool plus)
|
||||
|
@ -77,7 +77,7 @@ public class HighscoreRecordMenuManager : BaseInputBehavior
|
||||
TransportImage.sprite = GameManager.Instance.Transports[Entry.transport];
|
||||
if (TimeText != null)
|
||||
TimeText.text = Entry.timeStr;
|
||||
if (!IsSpawned || !selectionChanging)
|
||||
if (!IsSpawned && !selectionChanging)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(XAxisName))
|
||||
{
|
||||
@ -107,15 +107,24 @@ public class HighscoreRecordMenuManager : BaseInputBehavior
|
||||
if (Recorders[OtherPlayerIndex]==null || !Recorders[OtherPlayerIndex].Finished)
|
||||
{
|
||||
waitFor = true;
|
||||
foreach (var letter in Letters)
|
||||
{
|
||||
letter.GetComponent<HighscoreLetterManager> ().disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
//InputDelay = 250;
|
||||
Finished = false;
|
||||
waitFor = false;
|
||||
WaitText.gameObject.SetActive (false);
|
||||
foreach (var letter in Letters)
|
||||
{
|
||||
letter.GetComponent<HighscoreLetterManager> ().disabled = false;
|
||||
}
|
||||
//on récupère le highscore du joueur
|
||||
Entry = Player2 ? GameManager.Instance.EntryP2 : GameManager.Instance.EntryP1;
|
||||
CheckEntry();
|
||||
@ -126,9 +135,7 @@ public class HighscoreRecordMenuManager : BaseInputBehavior
|
||||
{
|
||||
if (!HighscoresManager.Current.IsANewRecord(Entry))
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
GameManager.Instance.DisplayMenu();
|
||||
//TODO : Navigate to next screen
|
||||
Finish ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ public class HighscoresManager
|
||||
filename = Application.streamingAssetsPath + "/highscores.json";
|
||||
Entries = new List<HighscoreEntry>();
|
||||
LoadFile();
|
||||
Init();
|
||||
//Init();
|
||||
}
|
||||
|
||||
|
||||
|
@ -14,11 +14,11 @@
|
||||
"Vélos": {
|
||||
"Joueur1": {
|
||||
"DiamètreRoue": 700,
|
||||
"NombreDeCapteurs": 1
|
||||
"NombreDeCapteurs": 4
|
||||
},
|
||||
"Joueur2": {
|
||||
"DiamètreRoue": 700,
|
||||
"NombreDeCapteurs": 1
|
||||
"NombreDeCapteurs": 4
|
||||
}
|
||||
},
|
||||
"Vidéos": {
|
||||
@ -26,8 +26,8 @@
|
||||
1: {"Fin": 125},
|
||||
2: {"Fin": 90},
|
||||
3: {"Fin": 93},
|
||||
4: {"Fin": 113},
|
||||
5: {"Fin": 72},
|
||||
4: {"Fin": 72},
|
||||
5: {"Fin": 113},
|
||||
6: {"Fin": 110},
|
||||
7: {"Fin": 70}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ EditorBuildSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
- enabled: 0
|
||||
path: Assets/Scenes/GameManagerTest.unity
|
||||
guid: 3bf6872fcde3f48108b47c2eaa97b6f7
|
||||
- enabled: 1
|
||||
|
@ -41,8 +41,8 @@ PlayerSettings:
|
||||
m_SplashScreenLogos: []
|
||||
m_VirtualRealitySplashScreen: {fileID: 0}
|
||||
m_HolographicTrackingLossScreen: {fileID: 0}
|
||||
defaultScreenWidth: 1024
|
||||
defaultScreenHeight: 768
|
||||
defaultScreenWidth: 1600
|
||||
defaultScreenHeight: 900
|
||||
defaultScreenWidthWeb: 960
|
||||
defaultScreenHeightWeb: 600
|
||||
m_StereoRenderingPath: 0
|
||||
@ -53,7 +53,7 @@ PlayerSettings:
|
||||
androidShowActivityIndicatorOnLoading: -1
|
||||
tizenShowActivityIndicatorOnLoading: -1
|
||||
iosAppInBackgroundBehavior: 0
|
||||
displayResolutionDialog: 1
|
||||
displayResolutionDialog: 0
|
||||
iosAllowHTTPDownload: 1
|
||||
allowedAutorotateToPortrait: 1
|
||||
allowedAutorotateToPortraitUpsideDown: 1
|
||||
@ -65,7 +65,7 @@ PlayerSettings:
|
||||
disableDepthAndStencilBuffers: 0
|
||||
androidBlitType: 0
|
||||
defaultIsFullScreen: 1
|
||||
defaultIsNativeResolution: 1
|
||||
defaultIsNativeResolution: 0
|
||||
macRetinaSupport: 1
|
||||
runInBackground: 0
|
||||
captureSingleScreen: 0
|
||||
@ -121,11 +121,11 @@ PlayerSettings:
|
||||
wiiUAllowScreenCapture: 1
|
||||
wiiUControllerCount: 0
|
||||
m_SupportedAspectRatios:
|
||||
4:3: 1
|
||||
5:4: 1
|
||||
16:10: 1
|
||||
4:3: 0
|
||||
5:4: 0
|
||||
16:10: 0
|
||||
16:9: 1
|
||||
Others: 1
|
||||
Others: 0
|
||||
bundleVersion: 1.0
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
|
Loading…
Reference in New Issue
Block a user