Commit 7bacb786 authored by kash's avatar kash

checkpoint is changed

parent cfacc7b0
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -212,7 +212,7 @@ Transform: ...@@ -212,7 +212,7 @@ Transform:
m_LocalScale: {x: 1000.0001, y: 1, z: 999.9999} m_LocalScale: {x: 1000.0001, y: 1, z: 999.9999}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 6 m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0.611, y: 0.0050000004, z: 0.84700006} m_LocalEulerAnglesHint: {x: 0.611, y: 0.0050000004, z: 0.84700006}
--- !u!1001 &698900617 --- !u!1001 &698900617
PrefabInstance: PrefabInstance:
...@@ -269,7 +269,7 @@ PrefabInstance: ...@@ -269,7 +269,7 @@ PrefabInstance:
- target: {fileID: 2070773664156325756, guid: 916384947382a4841bf79597a9e136ab, - target: {fileID: 2070773664156325756, guid: 916384947382a4841bf79597a9e136ab,
type: 3} type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 2 value: 3
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2070773664156325756, guid: 916384947382a4841bf79597a9e136ab, - target: {fileID: 2070773664156325756, guid: 916384947382a4841bf79597a9e136ab,
type: 3} type: 3}
...@@ -313,6 +313,90 @@ PrefabInstance: ...@@ -313,6 +313,90 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 916384947382a4841bf79597a9e136ab, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 916384947382a4841bf79597a9e136ab, type: 3}
--- !u!1001 &704967053
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6517492368474291616, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_Name
value: final orginal (2)
objectReference: {fileID: 0}
- target: {fileID: 6517492368474291616, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_LocalPosition.x
value: -86.529755
objectReference: {fileID: 0}
- target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_LocalPosition.z
value: 98.76987
objectReference: {fileID: 0}
- target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6517492369421744767, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6517492369421744767, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 93ab9d7bcd8b80744ab77a800f1db95b, type: 3}
--- !u!1 &705507993 --- !u!1 &705507993
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -376,7 +460,7 @@ Light: ...@@ -376,7 +460,7 @@ Light:
m_Cookie: {fileID: 0} m_Cookie: {fileID: 0}
m_DrawHalo: 0 m_DrawHalo: 0
m_Flare: {fileID: 0} m_Flare: {fileID: 0}
m_RenderMode: 0 m_RenderMode: 2
m_CullingMask: m_CullingMask:
serializedVersion: 2 serializedVersion: 2
m_Bits: 4294967295 m_Bits: 4294967295
...@@ -403,7 +487,7 @@ Transform: ...@@ -403,7 +487,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: 0} m_Father: {fileID: 0}
m_RootOrder: 3 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &921569260 stripped --- !u!1 &921569260 stripped
GameObject: GameObject:
...@@ -423,8 +507,8 @@ MonoBehaviour: ...@@ -423,8 +507,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fd8f749340a45ff4599bef5d4126805f, type: 3} m_Script: {fileID: 11500000, guid: fd8f749340a45ff4599bef5d4126805f, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
respawn: 32 respawn: 256
playerCar: {fileID: 0} firstPointComeBack: 257
--- !u!1 &1040609189 --- !u!1 &1040609189
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -518,6 +602,80 @@ Transform: ...@@ -518,6 +602,80 @@ Transform:
m_Father: {fileID: 2008584242} m_Father: {fileID: 2008584242}
m_RootOrder: 4 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1244552652
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 482569686955208340, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3}
propertyPath: m_Name
value: checkPoint (1)
objectReference: {fileID: 0}
- target: {fileID: 6766326031438728971, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3}
propertyPath: carPosition
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3}
propertyPath: m_LocalPosition.x
value: -16.27
objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3}
propertyPath: m_LocalPosition.y
value: 2.18
objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3}
propertyPath: m_LocalPosition.z
value: 29.405954
objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 56244b3d420d5a3459e68449d1f30fbf, type: 3}
--- !u!1001 &1281597507 --- !u!1001 &1281597507
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1096,7 +1254,7 @@ Transform: ...@@ -1096,7 +1254,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: 0} m_Father: {fileID: 0}
m_RootOrder: 5 m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1991534405 --- !u!1 &1991534405
GameObject: GameObject:
...@@ -1226,7 +1384,7 @@ Transform: ...@@ -1226,7 +1384,7 @@ Transform:
- {fileID: 1614892422} - {fileID: 1614892422}
- {fileID: 1389580375} - {fileID: 1389580375}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 7 m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &2047104779 --- !u!1001 &2047104779
PrefabInstance: PrefabInstance:
...@@ -1568,7 +1726,7 @@ PrefabInstance: ...@@ -1568,7 +1726,7 @@ PrefabInstance:
- target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b, - target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3} type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 1 value: 2
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b, - target: {fileID: 6517492368474291627, guid: 93ab9d7bcd8b80744ab77a800f1db95b,
type: 3} type: 3}
...@@ -1677,17 +1835,17 @@ PrefabInstance: ...@@ -1677,17 +1835,17 @@ PrefabInstance:
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf, - target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3} type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -37.9 value: -39.37
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf, - target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3} type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 4.75 value: 1.7
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf, - target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3} type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 173 value: 169.8
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf, - target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3} type: 3}
...@@ -1712,7 +1870,7 @@ PrefabInstance: ...@@ -1712,7 +1870,7 @@ PrefabInstance:
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf, - target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3} type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 4 value: 5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf, - target: {fileID: 8768170946503470804, guid: 56244b3d420d5a3459e68449d1f30fbf,
type: 3} type: 3}
......
...@@ -15,6 +15,8 @@ namespace TurnTheGameOn.IKDriver ...@@ -15,6 +15,8 @@ namespace TurnTheGameOn.IKDriver
void Awake () void Awake ()
{ {
CheckPointBlock.startPos = spawnPoint.position;
CheckPointBlock.startRotation = spawnPoint.rotation;
if (instance == null) if (instance == null)
{ {
instance = this; instance = this;
......
...@@ -25,7 +25,7 @@ PrefabInstance: ...@@ -25,7 +25,7 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: 1000011867238672, guid: 69b0f3c24e475f845af6f1c0c6a6cb9c, type: 3} - target: {fileID: 1000011867238672, guid: 69b0f3c24e475f845af6f1c0c6a6cb9c, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: IKD_VehicleController_LeftSteering (1) value: IKD_VehicleController_LeftSteering (1) Variant
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4000012522471688, guid: 69b0f3c24e475f845af6f1c0c6a6cb9c, type: 3} - target: {fileID: 4000012522471688, guid: 69b0f3c24e475f845af6f1c0c6a6cb9c, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
......
...@@ -1829,7 +1829,7 @@ Transform: ...@@ -1829,7 +1829,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6517492368203522143} m_GameObject: {fileID: 6517492368203522143}
m_LocalRotation: {x: -0, y: -0, z: 1.6007105e-10, w: 1} m_LocalRotation: {x: -0, y: -0, z: 1.6007105e-10, w: 1}
m_LocalPosition: {x: -0.001999421, y: -0.0050002486, z: 0.65099543} m_LocalPosition: {x: -0, y: -0.05, z: 0.65099543}
m_LocalScale: {x: 0.745, y: 0.7449999, z: 0.74499977} m_LocalScale: {x: 0.745, y: 0.7449999, z: 0.74499977}
m_Children: m_Children:
- {fileID: 6517492368741194658} - {fileID: 6517492368741194658}
...@@ -3925,9 +3925,9 @@ MonoBehaviour: ...@@ -3925,9 +3925,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 01f5ea7715eedc646ba52b708224b72b, type: 3} m_Script: {fileID: 11500000, guid: 01f5ea7715eedc646ba52b708224b72b, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
naturalFreaquency: 10 naturalFreaquency: 13.1
dampingRatio: 1.5 dampingRatio: 3
forceshift: 0 forceshift: 0.2
setSus: 1 setSus: 1
--- !u!114 &4444491943193057865 --- !u!114 &4444491943193057865
MonoBehaviour: MonoBehaviour:
...@@ -4700,7 +4700,7 @@ AudioListener: ...@@ -4700,7 +4700,7 @@ AudioListener:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6517492368601468568} m_GameObject: {fileID: 6517492368601468568}
m_Enabled: 1 m_Enabled: 0
--- !u!1 &6517492368607147318 --- !u!1 &6517492368607147318
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -10166,8 +10166,8 @@ Transform: ...@@ -10166,8 +10166,8 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6517492368692776198} m_GameObject: {fileID: 6517492368692776198}
m_LocalRotation: {x: -0, y: -0, z: 4.024514e-10, w: 1} m_LocalRotation: {x: -0, y: -0, z: 4.024514e-10, w: 1}
m_LocalPosition: {x: -1.0849601, y: 0.70719963, z: -2.8024435} m_LocalPosition: {x: -1.0849601, y: 0.66, z: -2.802412}
m_LocalScale: {x: 1.0000001, y: 1, z: 0.9999996} m_LocalScale: {x: 0.8, y: 0.8, z: 0.8}
m_Children: [] m_Children: []
m_Father: {fileID: 6517492368203522136} m_Father: {fileID: 6517492368203522136}
m_RootOrder: 3 m_RootOrder: 3
...@@ -10515,8 +10515,8 @@ Transform: ...@@ -10515,8 +10515,8 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6517492368741194657} m_GameObject: {fileID: 6517492368741194657}
m_LocalRotation: {x: -0, y: -0, z: 4.024514e-10, w: 1} m_LocalRotation: {x: -0, y: -0, z: 4.024514e-10, w: 1}
m_LocalPosition: {x: 1.1166323, y: 0.65859133, z: 0.9659908} m_LocalPosition: {x: 1.1166323, y: 0.66, z: 0.9659908}
m_LocalScale: {x: 1.0000001, y: 1, z: 0.9999996} m_LocalScale: {x: 0.8, y: 0.8, z: 0.8}
m_Children: [] m_Children: []
m_Father: {fileID: 6517492368203522136} m_Father: {fileID: 6517492368203522136}
m_RootOrder: 0 m_RootOrder: 0
...@@ -11016,7 +11016,7 @@ AudioListener: ...@@ -11016,7 +11016,7 @@ AudioListener:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6517492368844175641} m_GameObject: {fileID: 6517492368844175641}
m_Enabled: 1 m_Enabled: 0
--- !u!1 &6517492368884086041 --- !u!1 &6517492368884086041
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -11421,7 +11421,7 @@ AudioListener: ...@@ -11421,7 +11421,7 @@ AudioListener:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6517492369058466485} m_GameObject: {fileID: 6517492369058466485}
m_Enabled: 1 m_Enabled: 0
--- !u!1 &6517492369093988314 --- !u!1 &6517492369093988314
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -17571,8 +17571,8 @@ Transform: ...@@ -17571,8 +17571,8 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6517492369344569333} m_GameObject: {fileID: 6517492369344569333}
m_LocalRotation: {x: -0, y: -0, z: 4.024514e-10, w: 1} m_LocalRotation: {x: -0, y: -0, z: 4.024514e-10, w: 1}
m_LocalPosition: {x: -1.087161, y: 0.65950435, z: 0.9659606} m_LocalPosition: {x: -1.087161, y: 0.66, z: 0.9659908}
m_LocalScale: {x: 1.0000001, y: 1, z: 0.9999996} m_LocalScale: {x: 0.8, y: 0.8, z: 0.8}
m_Children: [] m_Children: []
m_Father: {fileID: 6517492368203522136} m_Father: {fileID: 6517492368203522136}
m_RootOrder: 1 m_RootOrder: 1
...@@ -18689,8 +18689,8 @@ Transform: ...@@ -18689,8 +18689,8 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6517492369559257458} m_GameObject: {fileID: 6517492369559257458}
m_LocalRotation: {x: -0, y: -0, z: 4.024514e-10, w: 1} m_LocalRotation: {x: -0, y: -0, z: 4.024514e-10, w: 1}
m_LocalPosition: {x: 1.118831, y: 0.70624083, z: -2.802412} m_LocalPosition: {x: 1.118831, y: 0.66, z: -2.802412}
m_LocalScale: {x: 1.0000001, y: 1, z: 0.9999996} m_LocalScale: {x: 0.8, y: 0.8, z: 0.8}
m_Children: [] m_Children: []
m_Father: {fileID: 6517492368203522136} m_Father: {fileID: 6517492368203522136}
m_RootOrder: 2 m_RootOrder: 2
......
...@@ -8,6 +8,7 @@ public class CarCustom : MonoBehaviour ...@@ -8,6 +8,7 @@ public class CarCustom : MonoBehaviour
private void Start() private void Start()
{ {
Respawner.myLoader += respawn; Respawner.myLoader += respawn;
Respawner.comeBackToStart += spawnFirstPlace;
} }
public void respawn() public void respawn()
...@@ -21,4 +22,10 @@ public class CarCustom : MonoBehaviour ...@@ -21,4 +22,10 @@ public class CarCustom : MonoBehaviour
{ {
Respawner.myLoader -= respawn; Respawner.myLoader -= respawn;
} }
public void spawnFirstPlace()
{
transform.position = CheckPointBlock.position;
transform.rotation = CheckPointBlock.rotaion;
}
} }
...@@ -6,6 +6,9 @@ public class CheckPointBlock : MonoBehaviour ...@@ -6,6 +6,9 @@ public class CheckPointBlock : MonoBehaviour
{ {
public static Vector3 position; public static Vector3 position;
public static Quaternion rotaion; public static Quaternion rotaion;
public static Vector3 startPos;
public static Quaternion startRotation;
public bool carPosition;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
...@@ -22,8 +25,16 @@ public class CheckPointBlock : MonoBehaviour ...@@ -22,8 +25,16 @@ public class CheckPointBlock : MonoBehaviour
{ {
if (other.tag == "Player") if (other.tag == "Player")
{ {
CheckPointBlock.position = this.transform.position; if (carPosition)
{
CheckPointBlock.position = other.transform.position;
CheckPointBlock.rotaion = other.transform.rotation;
}
else
{
CheckPointBlock.position = this.transform.position + Vector3.up * 0.2f;
CheckPointBlock.rotaion = this.transform.rotation; CheckPointBlock.rotaion = this.transform.rotation;
}
Debug.Log("check point"); Debug.Log("check point");
} }
} }
......
...@@ -6,8 +6,10 @@ using UnityEngine; ...@@ -6,8 +6,10 @@ using UnityEngine;
public class Respawner : MonoBehaviour public class Respawner : MonoBehaviour
{ {
public KeyCode respawn; public KeyCode respawn;
public KeyCode firstPointComeBack;
public static Action myLoader; public static Action myLoader;
public static Action comeBackToStart;
void Update() void Update()
...@@ -18,5 +20,14 @@ public class Respawner : MonoBehaviour ...@@ -18,5 +20,14 @@ public class Respawner : MonoBehaviour
myLoader(); myLoader();
} }
if (Input.GetKeyDown(firstPointComeBack))
{
if (comeBackToStart != null)
comeBackToStart();
}
} }
} }
...@@ -3,6 +3,10 @@ Microsoft Visual Studio Solution File, Format Version 12.00 ...@@ -3,6 +3,10 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{44D98F77-9C9E-A550-30C0-1838473E3E46}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{44D98F77-9C9E-A550-30C0-1838473E3E46}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-firstpass", "Assembly-CSharp-firstpass.csproj", "{39424FBA-72DC-78AB-BF56-A627E86AD9B1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor-firstpass", "Assembly-CSharp-Editor-firstpass.csproj", "{F10F4906-99B8-E8E7-F752-EF7B4ED69D61}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{56E6D49F-D179-E3A5-5661-AE2C6E05FDC6}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{56E6D49F-D179-E3A5-5661-AE2C6E05FDC6}"
EndProject EndProject
Global Global
...@@ -15,6 +19,14 @@ Global ...@@ -15,6 +19,14 @@ Global
{44D98F77-9C9E-A550-30C0-1838473E3E46}.Debug|Any CPU.Build.0 = Debug|Any CPU {44D98F77-9C9E-A550-30C0-1838473E3E46}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44D98F77-9C9E-A550-30C0-1838473E3E46}.Release|Any CPU.ActiveCfg = Release|Any CPU {44D98F77-9C9E-A550-30C0-1838473E3E46}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44D98F77-9C9E-A550-30C0-1838473E3E46}.Release|Any CPU.Build.0 = Release|Any CPU {44D98F77-9C9E-A550-30C0-1838473E3E46}.Release|Any CPU.Build.0 = Release|Any CPU
{39424FBA-72DC-78AB-BF56-A627E86AD9B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39424FBA-72DC-78AB-BF56-A627E86AD9B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39424FBA-72DC-78AB-BF56-A627E86AD9B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39424FBA-72DC-78AB-BF56-A627E86AD9B1}.Release|Any CPU.Build.0 = Release|Any CPU
{F10F4906-99B8-E8E7-F752-EF7B4ED69D61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F10F4906-99B8-E8E7-F752-EF7B4ED69D61}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F10F4906-99B8-E8E7-F752-EF7B4ED69D61}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F10F4906-99B8-E8E7-F752-EF7B4ED69D61}.Release|Any CPU.Build.0 = Release|Any CPU
{56E6D49F-D179-E3A5-5661-AE2C6E05FDC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {56E6D49F-D179-E3A5-5661-AE2C6E05FDC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{56E6D49F-D179-E3A5-5661-AE2C6E05FDC6}.Debug|Any CPU.Build.0 = Debug|Any CPU {56E6D49F-D179-E3A5-5661-AE2C6E05FDC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56E6D49F-D179-E3A5-5661-AE2C6E05FDC6}.Release|Any CPU.ActiveCfg = Release|Any CPU {56E6D49F-D179-E3A5-5661-AE2C6E05FDC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment