Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
car-sim-remaster
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
9631059
car-sim-remaster
Commits
dc948969
Commit
dc948969
authored
Jun 28, 2020
by
Danial KordModanlou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
a5b626ae
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
705 additions
and
957 deletions
+705
-957
workspace.xml
.idea/.idea.car-sim-remaster/.idea/workspace.xml
+270
-264
SampleScene.unity
Assets/Scenes/SampleScene.unity
+16
-635
IKD_DemoController.cs
...TheGameOn/IK Driver/Scripts/Utility/IKD_DemoController.cs
+2
-2
background.prefab
Assets/danial/background.prefab
+5
-21
IK Driver Demo Controller.prefab
Assets/prefabs/IK Driver Demo Controller.prefab
+395
-26
CarCustom.cs
Assets/scripts/CarCustom.cs
+12
-2
CheckPointBlock.cs
Assets/scripts/CheckPointBlock.cs
+0
-2
DataSaver.cs
Assets/scripts/DataSaver.cs
+5
-5
No files found.
.idea/.idea.car-sim-remaster/.idea/workspace.xml
View file @
dc948969
This diff is collapsed.
Click to expand it.
Assets/Scenes/SampleScene.unity
View file @
dc948969
This diff is collapsed.
Click to expand it.
Assets/TurnTheGameOn/IK Driver/Scripts/Utility/IKD_DemoController.cs
View file @
dc948969
...
...
@@ -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
;
...
...
Assets/danial/background.prefab
View file @
dc948969
...
...
@@ -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
:
33
5
,
y
:
210.7
}
m_AnchoredPosition
:
{
x
:
33
4.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
...
...
Assets/prefabs/IK Driver Demo Controller.prefab
View file @
dc948969
This diff is collapsed.
Click to expand it.
Assets/scripts/CarCustom.cs
View file @
dc948969
...
...
@@ -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);
}
}
Assets/scripts/CheckPointBlock.cs
View file @
dc948969
...
...
@@ -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
()
...
...
Assets/scripts/DataSaver.cs
View file @
dc948969
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment