1
0
Fork 0

BrakeBar zu UI hinzugefügt (noch nicht funktional)

This commit is contained in:
Triceraptodactyl 2018-04-23 21:14:04 +02:00
parent dd2a89ecca
commit 19b05321b7
6 changed files with 257 additions and 407 deletions

View file

@ -1,354 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1874613395391886}
m_IsPrefabParent: 1
--- !u!1 &1275305989310704
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224164241202895738}
- component: {fileID: 222317657359142688}
- component: {fileID: 114033798755836782}
m_Layer: 0
m_Name: Pointer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1730178688501482
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224985788887394804}
- component: {fileID: 223874505735571352}
- component: {fileID: 114938029598329918}
- component: {fileID: 114158644844654540}
m_Layer: 0
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1769303886924724
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224405087110538214}
- component: {fileID: 222887696722208392}
- component: {fileID: 114602871030768052}
m_Layer: 5
m_Name: Healthbar
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1874613395391886
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4747773548423212}
- component: {fileID: 114033126972021110}
m_Layer: 0
m_Name: HealthBar
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1968092576684628
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224066913994418724}
- component: {fileID: 222688251583601748}
- component: {fileID: 114214034073823864}
m_Layer: 0
m_Name: Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4747773548423212
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1874613395391886}
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:
- {fileID: 224985788887394804}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114033126972021110
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1874613395391886}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 0}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &114033798755836782
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1275305989310704}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, 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_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!114 &114158644844654540
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1730178688501482}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &114214034073823864
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1968092576684628}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0}
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_Sprite: {fileID: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!114 &114602871030768052
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1769303886924724}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, 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_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!114 &114938029598329918
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1730178688501482}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!222 &222317657359142688
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1275305989310704}
--- !u!222 &222688251583601748
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1968092576684628}
--- !u!222 &222887696722208392
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1769303886924724}
--- !u!223 &223874505735571352
Canvas:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1730178688501482}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &224066913994418724
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1968092576684628}
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:
- {fileID: 224405087110538214}
- {fileID: 224164241202895738}
m_Father: {fileID: 224985788887394804}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0.1, y: 0.15}
m_AnchoredPosition: {x: 747, y: 382.5}
m_SizeDelta: {x: 1494, y: 765}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224164241202895738
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1275305989310704}
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: 224066913994418724}
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: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224405087110538214
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1769303886924724}
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: 224066913994418724}
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: -780, y: -400}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224985788887394804
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1730178688501482}
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: 224066913994418724}
m_Father: {fileID: 4747773548423212}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
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}

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 743adb597a8a14d7ba3c90d0eed3d2ed
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -28,6 +28,24 @@ GameObject:
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!1 &1118501802334006
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224351136746992674}
- component: {fileID: 222022790769267342}
- component: {fileID: 114417389946489904}
- component: {fileID: 114745107968250074}
m_Layer: 5
m_Name: Pointer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1160732466323946 --- !u!1 &1160732466323946
GameObject: GameObject:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -62,6 +80,23 @@ GameObject:
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!1 &1418161294528772
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224609935718604692}
- component: {fileID: 222274365175932308}
- component: {fileID: 114414092698709752}
m_Layer: 5
m_Name: Scala
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1491047117667172 --- !u!1 &1491047117667172
GameObject: GameObject:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -150,6 +185,23 @@ GameObject:
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!1 &1773834359136924
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224654647045080780}
- component: {fileID: 222969496077047604}
- component: {fileID: 114060586777901180}
m_Layer: 5
m_Name: BrakeBar
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1776649970698928 --- !u!1 &1776649970698928
GameObject: GameObject:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -254,7 +306,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 224011665836974194} m_Father: {fileID: 224011665836974194}
m_RootOrder: 1 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114013939794050082 --- !u!114 &114013939794050082
MonoBehaviour: MonoBehaviour:
@ -344,6 +396,33 @@ MonoBehaviour:
m_CallState: 2 m_CallState: 2
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null Culture=neutral, PublicKeyToken=null
--- !u!114 &114060586777901180
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1773834359136924}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0}
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_Sprite: {fileID: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!114 &114132931230075030 --- !u!114 &114132931230075030
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -559,6 +638,60 @@ MonoBehaviour:
m_VerticalOverflow: 1 m_VerticalOverflow: 1
m_LineSpacing: 1 m_LineSpacing: 1
m_Text: Test m_Text: Test
--- !u!114 &114414092698709752
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1418161294528772}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, 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_Sprite: {fileID: 21300000, guid: cff6992dca838e9489cf342128410d5e, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!114 &114417389946489904
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1118501802334006}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, 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_Sprite: {fileID: 21300000, guid: f7cbbdc07a7d45e468493d5b9b1d5307, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!114 &114441665907648238 --- !u!114 &114441665907648238
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -694,6 +827,17 @@ MonoBehaviour:
m_FillAmount: 1 m_FillAmount: 1
m_FillClockwise: 1 m_FillClockwise: 1
m_FillOrigin: 0 m_FillOrigin: 0
--- !u!114 &114745107968250074
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1118501802334006}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d819f21fefea9da4199b468cca99e711, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &114750232192698844 --- !u!114 &114750232192698844
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -762,6 +906,7 @@ MonoBehaviour:
notifications: {fileID: 114700265308343224} notifications: {fileID: 114700265308343224}
restartUIPanel: {fileID: 1604998495297016} restartUIPanel: {fileID: 1604998495297016}
healthcontroller: {fileID: 114617351635937986} healthcontroller: {fileID: 114617351635937986}
brakeBarController: {fileID: 0}
mainMenuSceneIndex: 0 mainMenuSceneIndex: 0
--- !u!114 &114930219842054174 --- !u!114 &114930219842054174
MonoBehaviour: MonoBehaviour:
@ -863,6 +1008,12 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_HorizontalFit: 2 m_HorizontalFit: 2
m_VerticalFit: 0 m_VerticalFit: 0
--- !u!222 &222022790769267342
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1118501802334006}
--- !u!222 &222162700033887782 --- !u!222 &222162700033887782
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -887,6 +1038,12 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1738841749900334} m_GameObject: {fileID: 1738841749900334}
--- !u!222 &222274365175932308
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1418161294528772}
--- !u!222 &222407216902702286 --- !u!222 &222407216902702286
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -929,6 +1086,12 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1604998495297016} m_GameObject: {fileID: 1604998495297016}
--- !u!222 &222969496077047604
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1773834359136924}
--- !u!223 &223682460758231866 --- !u!223 &223682460758231866
Canvas: Canvas:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -959,6 +1122,7 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 224654647045080780}
- {fileID: 224688961504123188} - {fileID: 224688961504123188}
- {fileID: 4168470803218780} - {fileID: 4168470803218780}
- {fileID: 224035875368067210} - {fileID: 224035875368067210}
@ -983,7 +1147,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 224150154901314796} - {fileID: 224150154901314796}
m_Father: {fileID: 224011665836974194} m_Father: {fileID: 224011665836974194}
m_RootOrder: 2 m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1} m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
@ -1059,7 +1223,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 64.16286, y: 0} m_AnchoredPosition: {x: 66.52695, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0.5} m_Pivot: {x: 1, y: 0.5}
--- !u!224 &224218339018349506 --- !u!224 &224218339018349506
@ -1081,6 +1245,24 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: -219} m_AnchoredPosition: {x: 0, y: -219}
m_SizeDelta: {x: 160, y: 30} m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224351136746992674
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1118501802334006}
m_LocalRotation: {x: 0, y: 0, z: 0.76604444, w: 0.64278764}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.49999988, y: 0.49999988, z: 1}
m_Children: []
m_Father: {fileID: 224609935718604692}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 100}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -7.3055115, y: -3.7793121}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.05, y: 0.05}
--- !u!224 &224484966753135898 --- !u!224 &224484966753135898
RectTransform: RectTransform:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -1095,7 +1277,7 @@ RectTransform:
- {fileID: 224827547678119310} - {fileID: 224827547678119310}
- {fileID: 224218339018349506} - {fileID: 224218339018349506}
m_Father: {fileID: 224011665836974194} m_Father: {fileID: 224011665836974194}
m_RootOrder: 3 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
@ -1120,6 +1302,44 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: -94.8} m_AnchoredPosition: {x: 0, y: -94.8}
m_SizeDelta: {x: 160, y: 30} m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224609935718604692
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1418161294528772}
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:
- {fileID: 224351136746992674}
m_Father: {fileID: 224654647045080780}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 60, y: 120}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224654647045080780
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1773834359136924}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9999999, y: 0.9999999, z: 0.9999999}
m_Children:
- {fileID: 224609935718604692}
m_Father: {fileID: 224011665836974194}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 120, y: 120}
m_Pivot: {x: 0, y: 0}
--- !u!224 &224688961504123188 --- !u!224 &224688961504123188
RectTransform: RectTransform:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -1132,11 +1352,11 @@ RectTransform:
m_Children: m_Children:
- {fileID: 224833383346886274} - {fileID: 224833383346886274}
m_Father: {fileID: 224011665836974194} m_Father: {fileID: 224011665836974194}
m_RootOrder: 0 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 85, y: 0}
m_SizeDelta: {x: 120, y: 120} m_SizeDelta: {x: 120, y: 120}
m_Pivot: {x: 0, y: 0} m_Pivot: {x: 0, y: 0}
--- !u!224 &224827547678119310 --- !u!224 &224827547678119310

View file

@ -1,46 +1,31 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class BrakeBarController : MonoBehaviour { public class BrakeBarController : MonoBehaviour {
float currentRotation;
int BrakeAmount = 100; float maxRotation;
private Player player; private Player player;
float firstTime;
float secondTime;
// Use this for initialization // Update is called once per frame
void Start () { void Update() {
}
// Update is called once per frame
void Update () {
// if player alive and spawned // if player alive and spawned
if (player != null) if ( player != null ) {
{ UpdatePointer(maxRotation);
UpdatePointer(); } else if (currentRotation != 0) {
//if player dead or not spawned
UpdatePointer(0);
} }
}
private void UpdatePointer()
{
while (Input.GetKey(KeyCode.S))
{
firstTime += 1;
}
if (Input.GetKeyUp(KeyCode.S))
{
gameObject.transform.Rotate(Vector3.forward, firstTime);
}
}
} }
private void UpdatePointer(float brakesLeft) {
float offset = brakesLeft - currentRotation;
gameObject.transform.Rotate(Vector3.forward, offset);
currentRotation += offset;
}
public void SetPlayer(Player ply) {
player = ply;
}
}

View file

@ -209,9 +209,9 @@ public class GameController : MonoBehaviour {
spawn.transform.SetParent(spawnpointRoot.transform); spawn.transform.SetParent(spawnpointRoot.transform);
spawn.transform.position = new Vector3(dg.start.GetCenter().x, dg.start.GetCenter().y, 0); spawn.transform.position = new Vector3(dg.start.GetCenter().x, dg.start.GetCenter().y, 0);
start.SetSpawnPointsRootObject(spawnpointRoot); start.SetSpawnPointsRootObject(spawnpointRoot);
start.Reload(); start.Reload();
start.transform.SetParent(mapRoot.transform); start.transform.SetParent(mapRoot.transform);
// Finish room // Finish room
@ -276,7 +276,7 @@ public class GameController : MonoBehaviour {
} }
private void Starting() { private void Starting() {
StartObjective goal = new StartObjective(start, playerPrefab); StartObjective goal = new StartObjective(start, playerPrefab);
start.SetObjective(goal); start.SetObjective(goal);
start.OnPlayerEnter(player); start.OnPlayerEnter(player);
@ -284,6 +284,7 @@ public class GameController : MonoBehaviour {
if ( player != null ) { if ( player != null ) {
cam.GetComponent<CameraControl>().SetFollow(player.gameObject); cam.GetComponent<CameraControl>().SetFollow(player.gameObject);
GetUI().InitHealthController(player); GetUI().InitHealthController(player);
GetUI().InitBrakeController(player);
} else { } else {
Debug.Log("No Player spawned!"); Debug.Log("No Player spawned!");
} }

View file

@ -19,6 +19,9 @@ public class UIController : MonoBehaviour
[SerializeField] [SerializeField]
HealthbarController healthcontroller; HealthbarController healthcontroller;
[SerializeField]
BrakeBarController brakeBarController;
[SerializeField] [SerializeField]
int mainMenuSceneIndex = 0; int mainMenuSceneIndex = 0;
int firstSceneIndex = 1; int firstSceneIndex = 1;
@ -70,8 +73,11 @@ public class UIController : MonoBehaviour
healthcontroller.SetPlayer(ply); healthcontroller.SetPlayer(ply);
} }
public void InitBrakeController(Player ply) {
brakeBarController.SetPlayer(ply);
}
public NotificationManager GetNotificationManager() { public NotificationManager GetNotificationManager() {
return notifications; return notifications;
} }
} }