Commit dc948969 authored by Danial KordModanlou's avatar Danial KordModanlou

update

parent a5b626ae
This diff is collapsed.
......@@ -15,8 +15,8 @@ namespace TurnTheGameOn.IKDriver
void Awake ()
{
CheckPointBlock.startPos = spawnPoint.position;
CheckPointBlock.startRotation = spawnPoint.rotation;
// CheckPointBlock.startPos = spawnPoint.position;
// CheckPointBlock.startRotation = spawnPoint.rotation;
if (instance == null)
{
instance = this;
......
......@@ -63,8 +63,6 @@ MonoBehaviour:
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: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
......@@ -142,8 +140,6 @@ MonoBehaviour:
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: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
......@@ -191,7 +187,7 @@ RectTransform:
- {fileID: 9133287812176185236}
- {fileID: 9133287810168632780}
m_Father: {fileID: 9133287812064916901}
m_RootOrder: 0
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}
......@@ -224,8 +220,6 @@ MonoBehaviour:
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: 10911, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
......@@ -289,13 +283,9 @@ MonoBehaviour:
m_OnEndEdit:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_CustomCaretColor: 0
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
......@@ -329,17 +319,17 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9133287811150369422}
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: 1, y: 1, z: 1}
m_Children:
- {fileID: 9133287810581402852}
m_Father: {fileID: 9133287812064916901}
m_RootOrder: 1
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: 335, y: 210.7}
m_AnchoredPosition: {x: 334.99994, y: 210.69995}
m_SizeDelta: {x: 45.8, y: 33.4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9133287811150369410
......@@ -368,8 +358,6 @@ MonoBehaviour:
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: 5bb97cbee19f9e342ad77e3a49bbc3d8, type: 3}
m_Type: 0
m_PreserveAspect: 0
......@@ -434,8 +422,6 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!1 &9133287812064916897
GameObject:
m_ObjectHideFlags: 0
......@@ -468,8 +454,8 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 9133287810947964236}
- {fileID: 9133287811150369409}
- {fileID: 9133287810947964236}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -635,8 +621,6 @@ MonoBehaviour:
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: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
......
......@@ -6,16 +6,22 @@ using UnityEngine.SceneManagement;
public class CarCustom : MonoBehaviour
{
private Vector3 startPos;
private Quaternion startRotation;
private void Start()
{
Respawner.myLoader += respawn;
Respawner.comeBackToStart += spawnFirstPlace;
startPos = transform.position;
startRotation = transform.rotation;
}
public void respawn()
{
transform.position = CheckPointBlock.position;
transform.rotation = CheckPointBlock.rotaion;
DataSaver.checkPoint++;
Debug.Log("comes back");
}
......@@ -26,7 +32,11 @@ public class CarCustom : MonoBehaviour
public void spawnFirstPlace()
{
String thisScene = SceneManager.GetActiveScene().name;
SceneManager.LoadScene(thisScene);
// String thisScene = SceneManager.GetActiveScene().name;
DataSaver.checkPoint++;
transform.position = startPos;
transform.rotation = startRotation;
//SceneManager.LoadScene(thisScene);
}
}
......@@ -6,8 +6,6 @@ public class CheckPointBlock : MonoBehaviour
{
public static Vector3 position;
public static Quaternion rotaion;
public static Vector3 startPos;
public static Quaternion startRotation;
public bool carPosition;
// Start is called before the first frame update
void Start()
......
......@@ -32,7 +32,7 @@ public class DataSaver : MonoBehaviour
private menuSystem menu;
private String pName;
private String curentName;
public static int checkPoint = 1;
private bool newLineAdded = true;
// public static Action<String,Transform> OnCheckPoint;
......@@ -129,8 +129,8 @@ public class DataSaver : MonoBehaviour
rowDataTemp[10] = "None";
rowDataTemp[11] = "None";
}
string newLine = string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11}", rowDataTemp[0], rowDataTemp[1], rowDataTemp[2], rowDataTemp[3],rowDataTemp[4],
rowDataTemp[5], rowDataTemp[6], rowDataTemp[7], rowDataTemp[8], rowDataTemp[9], rowDataTemp[10], rowDataTemp[11]);
string newLine = string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12}", rowDataTemp[0], rowDataTemp[1], rowDataTemp[2], rowDataTemp[3],rowDataTemp[4],
rowDataTemp[5], rowDataTemp[6], rowDataTemp[7], rowDataTemp[8], rowDataTemp[9], rowDataTemp[10], rowDataTemp[11],checkPoint);
timePassed = 0;
csv.AppendLine(newLine);
......@@ -162,11 +162,11 @@ public class DataSaver : MonoBehaviour
{
if (!newLineAdded)
{
string newLine2 = string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11}",
string newLine2 = string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12}",
"distance x from first pivot", "distance y from first pivot", "distance z from first pivot",
"current speed", "last pivot name", "distance x to last pivot", "distance y to last pivot",
"distance z to last pivot",
"total distance with wall", "distance x with wall", "distance y with wall", "distance z with wall"
"total distance with wall", "distance x with wall", "distance y with wall", "distance z with wall","checkPint"
);
csv = new StringBuilder();
csv.AppendLine(newLine2);
......
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