Kinda lost the iteration aspect of this and just finished this prototype
up. So iteration 2 technically. Cleaned up some CarLogic code, did todos notably the brake force. Added the concept of wheels being on or off road and hampering acceleration if off road. Decided to do some camera work to get a better feel for acceleration/speed. Implemented Lap Timers, sections, and validation upon finishing a lap.
This commit is contained in:
parent
3e3a18c11d
commit
2b70c884ba
|
@ -3,20 +3,20 @@
|
|||
<component name="ContentModelUserStore">
|
||||
<attachedFolders />
|
||||
<explicitIncludes>
|
||||
<Path>Library/PackageCache/com.unity.2d.animation@5.0.3</Path>
|
||||
<Path>Library/PackageCache/com.unity.2d.animation@5.0.4</Path>
|
||||
<Path>Library/PackageCache/com.unity.2d.common@4.0.3</Path>
|
||||
<Path>Library/PackageCache/com.unity.2d.path@4.0.1</Path>
|
||||
<Path>Library/PackageCache/com.unity.2d.pixel-perfect@4.0.1</Path>
|
||||
<Path>Library/PackageCache/com.unity.2d.psdimporter@4.0.2</Path>
|
||||
<Path>Library/PackageCache/com.unity.2d.spriteshape@5.1.0</Path>
|
||||
<Path>Library/PackageCache/com.unity.2d.spriteshape@5.1.1</Path>
|
||||
<Path>Library/PackageCache/com.unity.collab-proxy@1.3.9</Path>
|
||||
<Path>Library/PackageCache/com.unity.ext.nunit@1.0.5</Path>
|
||||
<Path>Library/PackageCache/com.unity.ext.nunit@1.0.6</Path>
|
||||
<Path>Library/PackageCache/com.unity.ide.rider@2.0.7</Path>
|
||||
<Path>Library/PackageCache/com.unity.ide.visualstudio@2.0.5</Path>
|
||||
<Path>Library/PackageCache/com.unity.ide.vscode@1.2.3</Path>
|
||||
<Path>Library/PackageCache/com.unity.inputsystem@1.0.2</Path>
|
||||
<Path>Library/PackageCache/com.unity.mathematics@1.1.0</Path>
|
||||
<Path>Library/PackageCache/com.unity.test-framework@1.1.19</Path>
|
||||
<Path>Library/PackageCache/com.unity.test-framework@1.1.22</Path>
|
||||
<Path>Library/PackageCache/com.unity.textmeshpro@3.0.1</Path>
|
||||
<Path>Library/PackageCache/com.unity.timeline@1.4.4</Path>
|
||||
<Path>Packages</Path>
|
||||
|
|
|
@ -29,7 +29,11 @@ Transform:
|
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.6622988, y: 0.4244005, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Children:
|
||||
- {fileID: 3872392306363066559}
|
||||
- {fileID: 3478736834889377513}
|
||||
- {fileID: 4676146081282423851}
|
||||
- {fileID: 4106776612864750154}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -205,6 +209,294 @@ MonoBehaviour:
|
|||
m_Groups:
|
||||
m_Action: Brake
|
||||
m_Flags: 0
|
||||
- m_Name:
|
||||
m_Id: 2f39f0b8-5831-4bd0-8bc8-eda050d1ab7c
|
||||
m_Path: <Keyboard>/s
|
||||
m_Interactions:
|
||||
m_Processors:
|
||||
m_Groups:
|
||||
m_Action: Brake
|
||||
m_Flags: 0
|
||||
accelerationAmount: 1
|
||||
steeringAnglePerSecond: 30
|
||||
maxAcceleration: 5
|
||||
steeringAnglePerSecond: 55
|
||||
maxAcceleration: 10
|
||||
--- !u!1 &4347140594571366790
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3478736834889377513}
|
||||
- component: {fileID: 4847569739750041713}
|
||||
- component: {fileID: 6201809800703102424}
|
||||
m_Layer: 0
|
||||
m_Name: frontRIghtWheel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3478736834889377513
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4347140594571366790}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.3, y: 0.3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2407173318615250604}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!61 &4847569739750041713
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4347140594571366790}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.1, y: 0.2}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!114 &6201809800703102424
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4347140594571366790}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 93508d5af5fadde4eac94984663fd7d2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &6500951410401657453
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3872392306363066559}
|
||||
- component: {fileID: 4032535891543516727}
|
||||
- component: {fileID: 3492701898281898965}
|
||||
m_Layer: 0
|
||||
m_Name: frontLeftWheel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3872392306363066559
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6500951410401657453}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -0.3, y: 0.3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2407173318615250604}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!61 &4032535891543516727
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6500951410401657453}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.1, y: 0.2}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!114 &3492701898281898965
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6500951410401657453}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 93508d5af5fadde4eac94984663fd7d2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &7369725786977037651
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4106776612864750154}
|
||||
- component: {fileID: 5733070813734350544}
|
||||
- component: {fileID: 7508242202927344979}
|
||||
m_Layer: 0
|
||||
m_Name: rearRIghtWheel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4106776612864750154
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7369725786977037651}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.3, y: -0.3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2407173318615250604}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!61 &5733070813734350544
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7369725786977037651}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.1, y: 0.2}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!114 &7508242202927344979
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7369725786977037651}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 93508d5af5fadde4eac94984663fd7d2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &7705736284442945256
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4676146081282423851}
|
||||
- component: {fileID: 326076917418191716}
|
||||
- component: {fileID: 4896332539456050512}
|
||||
m_Layer: 0
|
||||
m_Name: rearLeftWheel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4676146081282423851
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7705736284442945256}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -0.3, y: -0.3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2407173318615250604}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!61 &326076917418191716
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7705736284442945256}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.1, y: 0.2}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!114 &4896332539456050512
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7705736284442945256}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 93508d5af5fadde4eac94984663fd7d2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,4 @@
|
|||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
|
@ -13,11 +14,19 @@ public class CarLogic : MonoBehaviour
|
|||
public float steeringAnglePerSecond = 10;
|
||||
|
||||
public float maxAcceleration = 100;
|
||||
public float brakingAmount;
|
||||
|
||||
private Rigidbody2D _rigidbody;
|
||||
private Transform _transform;
|
||||
private float _currentAcceleration;
|
||||
private float _wheelAccelerationAmount;
|
||||
private int _wheelOffroadCount = 0;
|
||||
|
||||
public float CurrentAccelerationRatio()
|
||||
{
|
||||
return _currentAcceleration / maxAcceleration;
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_rigidbody = GetComponent<Rigidbody2D>();
|
||||
|
@ -29,6 +38,26 @@ public class CarLogic : MonoBehaviour
|
|||
steeringAction.Enable();
|
||||
accelerationAction.Enable();
|
||||
brakeAction.Enable();
|
||||
|
||||
var wheels = GetComponentsInChildren<Wheel>();
|
||||
foreach (var wheel in wheels)
|
||||
{
|
||||
wheel.wheelOffRoad = WheelOffRoad;
|
||||
wheel.wheelOnRoad = WheelOnRoad;
|
||||
}
|
||||
|
||||
_wheelAccelerationAmount = maxAcceleration / 5f;
|
||||
_wheelOffroadCount = 4;
|
||||
}
|
||||
|
||||
private void WheelOffRoad()
|
||||
{
|
||||
_wheelOffroadCount++;
|
||||
}
|
||||
|
||||
private void WheelOnRoad()
|
||||
{
|
||||
_wheelOffroadCount--;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
@ -59,28 +88,23 @@ public class CarLogic : MonoBehaviour
|
|||
}
|
||||
|
||||
_currentAcceleration += accelerationValue * accelerationAmount * Time.deltaTime;
|
||||
|
||||
_currentAcceleration -= brakeValue * brakingAmount * Time.deltaTime;
|
||||
|
||||
// TODO: probably want a brake amount, up to designers to make sure braking out performs acceleration, if desired.
|
||||
_currentAcceleration -= brakeValue * accelerationAmount * Time.deltaTime * 2;
|
||||
|
||||
var newAngle = steeringValue * steeringAnglePerSecond * Time.deltaTime;
|
||||
|
||||
if (_currentAcceleration > 0.01)
|
||||
if (_currentAcceleration > maxAcceleration / 3f)
|
||||
{
|
||||
_transform.Rotate(Vector3.forward, newAngle, Space.World);
|
||||
_currentAcceleration -= _wheelOffroadCount * _wheelAccelerationAmount * Time.deltaTime;
|
||||
}
|
||||
|
||||
// TODO: reverse logic.
|
||||
if (_currentAcceleration < 0)
|
||||
_currentAcceleration = Mathf.Clamp(_currentAcceleration, 0, maxAcceleration);
|
||||
|
||||
if (_currentAcceleration > 0.01)
|
||||
{
|
||||
_currentAcceleration = 0;
|
||||
}
|
||||
|
||||
if (_currentAcceleration > maxAcceleration)
|
||||
{
|
||||
_currentAcceleration = maxAcceleration;
|
||||
var newAngle = steeringValue * steeringAnglePerSecond * Time.deltaTime;
|
||||
_transform.Rotate(Vector3.forward, newAngle, Space.World);
|
||||
}
|
||||
|
||||
_rigidbody.velocity = _transform.up * _currentAcceleration;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class CheckPoint : MonoBehaviour
|
||||
{
|
||||
public Action CarPassed;
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
CarPassed?.Invoke();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4c8ee6d2c6a119049a7f91df5e7712eb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,27 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Assertions;
|
||||
using UnityEngine.UI;
|
||||
|
||||
[RequireComponent(typeof(Camera))]
|
||||
public class FovAccelerator : MonoBehaviour
|
||||
{
|
||||
public float minFov;
|
||||
public float maxFov;
|
||||
public CarLogic car;
|
||||
|
||||
private Camera _camera;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Assert.IsTrue(car != null);
|
||||
|
||||
_camera = GetComponent<Camera>();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
_camera.orthographicSize = Mathf.Lerp(minFov, maxFov, car.CurrentAccelerationRatio());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 548651d9ce9e2ee4a9b5a06f9c50f417
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,75 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class LapTime : MonoBehaviour
|
||||
{
|
||||
public CheckPoint finishLine;
|
||||
public CheckPoint checkPoint1;
|
||||
public CheckPoint checkPoint2;
|
||||
public CheckPoint checkPoint3;
|
||||
|
||||
private float _startTime = -1;
|
||||
private float _checkPoint1Time;
|
||||
private float _checkPoint2Time;
|
||||
private float _checkPoint3Time;
|
||||
private float _finishTime;
|
||||
private float _bestTime;
|
||||
|
||||
public string GetTimeString()
|
||||
{
|
||||
return
|
||||
$"Sector 1: {_checkPoint1Time:F}\nSector 2: {_checkPoint2Time:F}\nSector 3: {_checkPoint3Time:F}\nLast Lap Time: {_finishTime:F}\nBest Lap: {_bestTime:F}";
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
private void Start()
|
||||
{
|
||||
finishLine.CarPassed += FinishedLine;
|
||||
checkPoint1.CarPassed += CheckPoint1Passed;
|
||||
checkPoint2.CarPassed += CheckPoint2Passed;
|
||||
checkPoint3.CarPassed += CheckPoint3Passed;
|
||||
_bestTime = float.MaxValue;
|
||||
_finishTime = float.MaxValue;
|
||||
}
|
||||
|
||||
private void CheckPoint1Passed()
|
||||
{
|
||||
_checkPoint1Time = Time.time - _startTime;
|
||||
}
|
||||
|
||||
private void CheckPoint2Passed()
|
||||
{
|
||||
_checkPoint2Time = Time.time - _startTime - _checkPoint1Time;
|
||||
}
|
||||
|
||||
private void CheckPoint3Passed()
|
||||
{
|
||||
_checkPoint3Time = Time.time - _startTime - _checkPoint2Time - _checkPoint1Time;
|
||||
}
|
||||
|
||||
private void ResetTimers()
|
||||
{
|
||||
_startTime = Time.time;
|
||||
_checkPoint1Time = 0;
|
||||
_checkPoint2Time = 0;
|
||||
_checkPoint3Time = 0;
|
||||
if (_finishTime < _bestTime)
|
||||
{
|
||||
_bestTime = _finishTime;
|
||||
}
|
||||
}
|
||||
|
||||
private void FinishedLine()
|
||||
{
|
||||
// make sure we didn't skip a checkpoint.
|
||||
if (_checkPoint1Time > 0 && _checkPoint2Time > 0 && _checkPoint3Time > 0)
|
||||
{
|
||||
// we finished
|
||||
_finishTime = Time.time - _startTime;
|
||||
ResetTimers();
|
||||
}
|
||||
else
|
||||
{
|
||||
ResetTimers();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2df89bc7088dfe646bb46e4bf5096c1b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,19 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
[RequireComponent(typeof(Text))]
|
||||
public class LapTimeDisplay : MonoBehaviour
|
||||
{
|
||||
private Text _text;
|
||||
public LapTime _lapTime;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_text = GetComponent<Text>();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
_text.text = _lapTime.GetTimeString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 365f6a871ab4dce4da64e32f8cf4ecf1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(Collider2D))]
|
||||
public class Wheel : MonoBehaviour
|
||||
{
|
||||
public Action wheelOffRoad;
|
||||
public Action wheelOnRoad;
|
||||
|
||||
private void OnTriggerExit2D(Collider2D other)
|
||||
{
|
||||
wheelOffRoad?.Invoke();
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
wheelOnRoad?.Invoke();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 93508d5af5fadde4eac94984663fd7d2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -163,7 +163,7 @@ TextureImporter:
|
|||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spritePixelsToUnits: 128
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
|
|
|
@ -0,0 +1,285 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &5085765716737509254
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7519069401886014256}
|
||||
- component: {fileID: 6970328507256319166}
|
||||
m_Layer: 31
|
||||
m_Name: Objects
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7519069401886014256
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5085765716737509254}
|
||||
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: 3388998075054867912}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!156049354 &6970328507256319166
|
||||
Grid:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5085765716737509254}
|
||||
m_Enabled: 1
|
||||
m_CellSize: {x: 1.41, y: 1.41, z: 0}
|
||||
m_CellGap: {x: 0, y: 0, z: 0}
|
||||
m_CellLayout: 0
|
||||
m_CellSwizzle: 0
|
||||
--- !u!1 &8249882540943960114
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3388998075054867912}
|
||||
- component: {fileID: 3569021832222187656}
|
||||
- component: {fileID: 562879716377189290}
|
||||
m_Layer: 0
|
||||
m_Name: Layer1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3388998075054867912
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8249882540943960114}
|
||||
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: 7519069401886014256}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1839735485 &3569021832222187656
|
||||
Tilemap:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8249882540943960114}
|
||||
m_Enabled: 1
|
||||
m_Tiles:
|
||||
- first: {x: -21, y: -4, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 0
|
||||
m_TileSpriteIndex: 1
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: -21, y: -3, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 1
|
||||
m_TileSpriteIndex: 2
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: -17, y: 0, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 4
|
||||
m_TileSpriteIndex: 4
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: -11, y: 0, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 2
|
||||
m_TileSpriteIndex: 0
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 1
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741827
|
||||
- first: {x: -17, y: 1, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 5
|
||||
m_TileSpriteIndex: 5
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: -11, y: 1, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 3
|
||||
m_TileSpriteIndex: 3
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
m_AnimatedTiles: {}
|
||||
m_TileAssetArray:
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: 11400000, guid: c0d22d5627490c24ebe3569e8d629855, type: 2}
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: 11400000, guid: 953348eb144557d448da7e32c822f919, type: 2}
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: 0}
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: 11400000, guid: a57eaa64819d6ea4c8f02fd6fe621034, type: 2}
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: 11400000, guid: 8ebfd6c1c343c40429cbd8f30b715e88, type: 2}
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: 11400000, guid: 250c740329d9f9743b177841390284dc, type: 2}
|
||||
m_TileSpriteArray:
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: 0}
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: -7349831758899924383, guid: 54542ebe423e7114cb37b20ad8b83732, type: 3}
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: -362971173625963260, guid: 54542ebe423e7114cb37b20ad8b83732, type: 3}
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: -629411935564678185, guid: 54542ebe423e7114cb37b20ad8b83732, type: 3}
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: -1978800324143073191, guid: 54542ebe423e7114cb37b20ad8b83732, type: 3}
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: 3431848609683129914, guid: 54542ebe423e7114cb37b20ad8b83732, type: 3}
|
||||
m_TileMatrixArray:
|
||||
- m_RefCount: 6
|
||||
m_Data:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_TileColorArray:
|
||||
- m_RefCount: 5
|
||||
m_Data: {r: 1, g: 1, b: 1, a: 1}
|
||||
- m_RefCount: 1
|
||||
m_Data: {r: 0.72631866, g: 0.41725624, b: 0.4958697, a: 1}
|
||||
m_TileObjectToInstantiateArray: []
|
||||
m_AnimationFrameRate: 1
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Origin: {x: -21, y: -4, z: 0}
|
||||
m_Size: {x: 27, y: 9, z: 1}
|
||||
m_TileAnchor: {x: 0.5, y: 0.5, z: 0}
|
||||
m_TileOrientation: 0
|
||||
m_TileOrientationMatrix:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
--- !u!483693784 &562879716377189290
|
||||
TilemapRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8249882540943960114}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 0
|
||||
m_ReflectionProbeUsage: 0
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_ChunkSize: {x: 32, y: 32, z: 32}
|
||||
m_ChunkCullingBounds: {x: 1.74, y: 0.615, z: 0}
|
||||
m_MaxChunkCount: 16
|
||||
m_MaxFrameAge: 16
|
||||
m_SortOrder: 0
|
||||
m_Mode: 0
|
||||
m_DetectChunkCullingBounds: 0
|
||||
m_MaskInteraction: 0
|
||||
--- !u!114 &1072080349744664735
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 12395, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: Palette Settings
|
||||
m_EditorClassIdentifier:
|
||||
cellSizing: 0
|
||||
m_TransparencySortMode: 0
|
||||
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a4c74d8bc3d1ace4b95b31a91a58839a
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,36 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: barrel_red.png
|
||||
m_EditorClassIdentifier:
|
||||
m_Sprite: {fileID: 3431848609683129914, guid: 54542ebe423e7114cb37b20ad8b83732, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Transform:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_InstancedGameObject: {fileID: 0}
|
||||
m_Flags: 1
|
||||
m_ColliderType: 1
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 250c740329d9f9743b177841390284dc
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,36 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: barrel_red_down.png
|
||||
m_EditorClassIdentifier:
|
||||
m_Sprite: {fileID: -1978800324143073191, guid: 54542ebe423e7114cb37b20ad8b83732, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Transform:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_InstancedGameObject: {fileID: 0}
|
||||
m_Flags: 1
|
||||
m_ColliderType: 1
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8ebfd6c1c343c40429cbd8f30b715e88
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,36 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: tree_small.png
|
||||
m_EditorClassIdentifier:
|
||||
m_Sprite: {fileID: -7349831758899924383, guid: 54542ebe423e7114cb37b20ad8b83732, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Transform:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_InstancedGameObject: {fileID: 0}
|
||||
m_Flags: 1
|
||||
m_ColliderType: 1
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c0d22d5627490c24ebe3569e8d629855
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,36 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: tribune_empty.png
|
||||
m_EditorClassIdentifier:
|
||||
m_Sprite: {fileID: -362971173625963260, guid: 54542ebe423e7114cb37b20ad8b83732, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Transform:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_InstancedGameObject: {fileID: 0}
|
||||
m_Flags: 1
|
||||
m_ColliderType: 1
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 953348eb144557d448da7e32c822f919
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,36 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: tribune_full.png
|
||||
m_EditorClassIdentifier:
|
||||
m_Sprite: {fileID: -629411935564678185, guid: 54542ebe423e7114cb37b20ad8b83732, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Transform:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_InstancedGameObject: {fileID: 0}
|
||||
m_Flags: 1
|
||||
m_ColliderType: 1
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a57eaa64819d6ea4c8f02fd6fe621034
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -53,4 +53,4 @@ Physics2DSettings:
|
|||
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
|
||||
m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
|
||||
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
|
||||
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
m_LayerCollisionMatrix: f7fffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
m_EditorVersion: 2020.2.1f1
|
||||
m_EditorVersionWithRevision: 2020.2.1f1 (270dd8c3da1c)
|
||||
m_EditorVersion: 2020.2.5f1
|
||||
m_EditorVersionWithRevision: 2020.2.5f1 (e2c53f129de5)
|
||||
|
|
|
@ -8,10 +8,10 @@ TagManager:
|
|||
- Default
|
||||
- TransparentFX
|
||||
- Ignore Raycast
|
||||
-
|
||||
- LapTime
|
||||
- Water
|
||||
- UI
|
||||
-
|
||||
- Car
|
||||
-
|
||||
-
|
||||
-
|
||||
|
|
Loading…
Reference in New Issue