Road kill + sound effects

This commit is contained in:
magn9775
2024-04-20 15:02:09 +02:00
parent 2ceb18470b
commit 601de22cfa
18 changed files with 536 additions and 103 deletions

View File

@@ -12,6 +12,9 @@ AnimatorStateMachine:
- serializedVersion: 1
m_State: {fileID: 7351787119493499002}
m_Position: {x: 260, y: 120, z: 0}
- serializedVersion: 1
m_State: {fileID: 6352400568097308512}
m_Position: {x: 536.5, y: 98, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
@@ -22,6 +25,31 @@ AnimatorStateMachine:
m_ExitPosition: {x: 50, y: 200, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 7351787119493499002}
--- !u!1101 &-5656815982725326556
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: hit
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 6352400568097308512}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.08747059
m_TransitionOffset: 0
m_ExitTime: 0.68750006
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
@@ -36,7 +64,7 @@ AnimatorController:
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
@@ -50,31 +78,33 @@ AnimatorController:
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &3391303776837596513
AnimatorStateTransition:
--- !u!1102 &6352400568097308512
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: hit
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 0}
m_Solo: 0
m_Mute: 0
m_IsExit: 1
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.6875
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
m_Name: New State
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 9087452573951014707}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: -4225938145651474181, guid: aea48e2ff51aa6b40939f4137190fe1a, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &7351787119493499002
AnimatorState:
serializedVersion: 6
@@ -86,7 +116,7 @@ AnimatorState:
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 3391303776837596513}
- {fileID: -5656815982725326556}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@@ -102,3 +132,25 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &9087452573951014707
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 0}
m_Solo: 0
m_Mute: 0
m_IsExit: 1
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1

View File

@@ -32,6 +32,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7953198523918571078}
- {fileID: 7580806137045057973}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!54 &3239213433477781764
@@ -79,7 +80,136 @@ MonoBehaviour:
steeringRange: 9
steeringRangeAtMaxSpeed: 7
autoBrake: 100
audio: {fileID: 7321855203641968658}
rigidBody: {fileID: 0}
--- !u!1 &5980600979410270282
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7580806137045057973}
- component: {fileID: 7321855203641968658}
m_Layer: 0
m_Name: Audio Source
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7580806137045057973
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5980600979410270282}
serializedVersion: 2
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5420764024659664985}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &7321855203641968658
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5980600979410270282}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 03cf3a122d2eb1c4a80974b0b230c32e, type: 3}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1001 &6613855157239500655
PrefabInstance:
m_ObjectHideFlags: 0

View File

@@ -1,5 +1,133 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4294643032488269249
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3402212350287304862}
- component: {fileID: 3145158689763114562}
m_Layer: 0
m_Name: Audio Source
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3402212350287304862
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4294643032488269249}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5026680989480309367}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &3145158689763114562
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4294643032488269249}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 4e1149ba6d19d1c4281200dde55135e6, type: 3}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &7873748132333035523
GameObject:
m_ObjectHideFlags: 0
@@ -30,6 +158,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4708866403435582262}
- {fileID: 3402212350287304862}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &7210405270900437982
@@ -54,7 +183,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2686890238580842728, guid: 4a076a09e2096f140b4008b73dea295f, type: 3}
propertyPath: m_LocalPosition.x
value: 1.0793991
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2686890238580842728, guid: 4a076a09e2096f140b4008b73dea295f, type: 3}
propertyPath: m_LocalPosition.y
@@ -62,7 +191,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2686890238580842728, guid: 4a076a09e2096f140b4008b73dea295f, type: 3}
propertyPath: m_LocalPosition.z
value: -0.66389465
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2686890238580842728, guid: 4a076a09e2096f140b4008b73dea295f, type: 3}
propertyPath: m_LocalRotation.w
@@ -106,6 +235,10 @@ PrefabInstance:
objectReference: {fileID: 9100000, guid: d9c894ea49b0fb94cb28a35a699c3e94, type: 2}
- target: {fileID: 2686890238588325744, guid: 4a076a09e2096f140b4008b73dea295f, type: 3}
propertyPath: m_UpdateMode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2686890238588325744, guid: 4a076a09e2096f140b4008b73dea295f, type: 3}
propertyPath: m_ApplyRootMotion
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
@@ -121,6 +254,9 @@ PrefabInstance:
- targetCorrespondingSourceObject: {fileID: 2686890238580948208, guid: 4a076a09e2096f140b4008b73dea295f, type: 3}
insertIndex: -1
addedObject: {fileID: 1370752439168850412}
- targetCorrespondingSourceObject: {fileID: 2686890238580948208, guid: 4a076a09e2096f140b4008b73dea295f, type: 3}
insertIndex: -1
addedObject: {fileID: 8808035500639022898}
- targetCorrespondingSourceObject: {fileID: 2686890238580948144, guid: 4a076a09e2096f140b4008b73dea295f, type: 3}
insertIndex: -1
addedObject: {fileID: 1018859598360546144}
@@ -717,6 +853,11 @@ CharacterJoint:
m_EnablePreprocessing: 0
m_MassScale: 1
m_ConnectedMassScale: 1
--- !u!95 &4708866403428105390 stripped
Animator:
m_CorrespondingSourceObject: {fileID: 2686890238588325744, guid: 4a076a09e2096f140b4008b73dea295f, type: 3}
m_PrefabInstance: {fileID: 7210405270900437982}
m_PrefabAsset: {fileID: 0}
--- !u!1 &4708866403435482838 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2686890238580948232, guid: 4a076a09e2096f140b4008b73dea295f, type: 3}
@@ -729,11 +870,14 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4708866403435482838}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1cf5c39eb580998489213d03ff8a6760, type: 3}
m_Name:
m_EditorClassIdentifier:
animator: {fileID: 0}
npcPrefab: {fileID: 0}
audio: {fileID: 0}
--- !u!1 &4708866403435482896 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2686890238580948174, guid: 4a076a09e2096f140b4008b73dea295f, type: 3}
@@ -886,6 +1030,21 @@ Rigidbody:
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &8808035500639022898
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4708866403435482926}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1cf5c39eb580998489213d03ff8a6760, type: 3}
m_Name:
m_EditorClassIdentifier:
animator: {fileID: 4708866403428105390}
npcPrefab: {fileID: 7873748132333035523}
audio: {fileID: 3145158689763114562}
--- !u!1 &4708866403435482990 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2686890238580948144, guid: 4a076a09e2096f140b4008b73dea295f, type: 3}

View File

@@ -14,7 +14,7 @@ GameObject:
- component: {fileID: 9046004907962160293}
m_Layer: 0
m_Name: Cube (11)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -119,7 +119,7 @@ GameObject:
- component: {fileID: 7100447636214970908}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -224,7 +224,7 @@ GameObject:
- component: {fileID: 1341409128997146992}
m_Layer: 0
m_Name: Cube (16)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -329,7 +329,7 @@ GameObject:
- component: {fileID: 5078913781498215458}
m_Layer: 0
m_Name: Cube (15)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -466,7 +466,7 @@ GameObject:
- component: {fileID: 4685269161295262746}
m_Layer: 0
m_Name: Cube (13)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -571,7 +571,7 @@ GameObject:
- component: {fileID: 4287040107425492256}
m_Layer: 0
m_Name: Cube (12)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -676,7 +676,7 @@ GameObject:
- component: {fileID: 2948202425872757447}
m_Layer: 0
m_Name: Cube (6)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -781,7 +781,7 @@ GameObject:
- component: {fileID: 5102407533153953392}
m_Layer: 0
m_Name: Cube (3)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -886,7 +886,7 @@ GameObject:
- component: {fileID: 9044466425006552668}
m_Layer: 0
m_Name: Cube (14)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -991,7 +991,7 @@ GameObject:
- component: {fileID: 7999609843063695797}
m_Layer: 0
m_Name: Cube (1)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -1093,7 +1093,7 @@ GameObject:
- component: {fileID: 25890329991868986}
m_Layer: 0
m_Name: tiles
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -1138,7 +1138,7 @@ GameObject:
- component: {fileID: 3751945649759859707}
m_Layer: 0
m_Name: Cube (9)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

View File

@@ -50,7 +50,7 @@ GameObject:
- component: {fileID: 5771702751970621073}
m_Layer: 0
m_Name: Cube (3)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -155,7 +155,7 @@ GameObject:
- component: {fileID: 1937590893865480831}
m_Layer: 0
m_Name: Cube (2)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -260,7 +260,7 @@ GameObject:
- component: {fileID: 2423518239542763034}
m_Layer: 0
m_Name: Cube (4)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -365,7 +365,7 @@ GameObject:
- component: {fileID: 5876408678062153254}
m_Layer: 0
m_Name: Cube (5)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -470,7 +470,7 @@ GameObject:
- component: {fileID: 8551682741967469045}
m_Layer: 0
m_Name: Cube (1)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

View File

@@ -14,7 +14,7 @@ GameObject:
- component: {fileID: 7377430079442670249}
m_Layer: 0
m_Name: Cube (46)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -119,7 +119,7 @@ GameObject:
- component: {fileID: 337858236832684870}
m_Layer: 0
m_Name: Cube (49)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -224,7 +224,7 @@ GameObject:
- component: {fileID: 6324662781498377439}
m_Layer: 0
m_Name: Cube (48)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -329,7 +329,7 @@ GameObject:
- component: {fileID: 2593295261566518925}
m_Layer: 0
m_Name: Cube (52)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -434,7 +434,7 @@ GameObject:
- component: {fileID: 2982208812255800916}
m_Layer: 0
m_Name: Cube (47)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -580,7 +580,7 @@ GameObject:
- component: {fileID: 2838680319682986669}
m_Layer: 0
m_Name: Cube (44)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -685,7 +685,7 @@ GameObject:
- component: {fileID: 9114364669899449040}
m_Layer: 0
m_Name: Cube (43)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -790,7 +790,7 @@ GameObject:
- component: {fileID: 3933197776306164815}
m_Layer: 0
m_Name: Cube (45)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -895,7 +895,7 @@ GameObject:
- component: {fileID: 3808122016447614633}
m_Layer: 0
m_Name: Cube (51)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -1000,7 +1000,7 @@ GameObject:
- component: {fileID: 6155733002223339496}
m_Layer: 0
m_Name: Cube (50)
m_TagString: Untagged
m_TagString: Wall
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

View File

@@ -325,11 +325,6 @@ MonoBehaviour:
CameraRadius: 0.2
DampingIntoCollision: 0
DampingFromCollision: 2
--- !u!95 &349711109 stripped
Animator:
m_CorrespondingSourceObject: {fileID: 4708866403428105390, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3}
m_PrefabInstance: {fileID: 5211344267139555828}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &434643104
PrefabInstance:
m_ObjectHideFlags: 0
@@ -836,6 +831,10 @@ PrefabInstance:
propertyPath: m_Name
value: Character
objectReference: {fileID: 0}
- target: {fileID: 1907112288057292323, guid: 9ffbbbe0f32e84c418118cfd82141aa5, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3118456698246916321, guid: 9ffbbbe0f32e84c418118cfd82141aa5, type: 3}
propertyPath: m_LocalPosition.x
value: 82.05
@@ -1541,7 +1540,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2512004550964339037, guid: e7761d102bda0a1489c474fc5bd35a47, type: 3}
propertyPath: m_LocalPosition.x
value: 62.4
value: 80.95
objectReference: {fileID: 0}
- target: {fileID: 2512004550964339037, guid: e7761d102bda0a1489c474fc5bd35a47, type: 3}
propertyPath: m_LocalPosition.y
@@ -1549,7 +1548,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2512004550964339037, guid: e7761d102bda0a1489c474fc5bd35a47, type: 3}
propertyPath: m_LocalPosition.z
value: -38.5
value: -46.36
objectReference: {fileID: 0}
- target: {fileID: 2512004550964339037, guid: e7761d102bda0a1489c474fc5bd35a47, type: 3}
propertyPath: m_LocalRotation.w
@@ -1832,6 +1831,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
animator: {fileID: 0}
npcPrefab: {fileID: 0}
audio: {fileID: 0}
--- !u!1 &2049722134
GameObject:
m_ObjectHideFlags: 0
@@ -1959,24 +1960,6 @@ MonoBehaviour:
m_CameraActivatedEvent:
m_PersistentCalls:
m_Calls: []
--- !u!1 &2131469199 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4708866403435482926, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3}
m_PrefabInstance: {fileID: 5211344267139555828}
m_PrefabAsset: {fileID: 0}
--- !u!114 &2131469203
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2131469199}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1cf5c39eb580998489213d03ff8a6760, type: 3}
m_Name:
m_EditorClassIdentifier:
animator: {fileID: 349711109}
--- !u!1001 &802517270703114805
PrefabInstance:
m_ObjectHideFlags: 0
@@ -2042,22 +2025,6 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4577861784530903037, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4708866403428105390, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4708866403428105390, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3}
propertyPath: m_UpdateMode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4708866403428105390, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3}
propertyPath: m_ApplyRootMotion
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5026680989480309367, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3}
propertyPath: m_LocalPosition.x
value: 82.02
@@ -2105,10 +2072,7 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 4708866403435482926, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3}
insertIndex: -1
addedObject: {fileID: 2131469203}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3}
--- !u!1660057539 &9223372036854775807
SceneRoots:

View File

@@ -4,23 +4,40 @@ using UnityEngine;
public class NPCimproved : MonoBehaviour
{
// Animator animator;
public Animator animator;
public GameObject npcPrefab;
public AudioSource audio;
private bool walking = true;
void Start()
{
}
void Update()
{
if (walking)
{
npcPrefab.transform.position += new Vector3(00,0,0.005f);
}
}
// Disabels the animation controller, to simulate getting hit by car
void OnCollisionEnter(Collision col) {
if (col.gameObject.tag == "Player")
{
animator.SetTrigger("hit");
if (walking)
{
audio.Play();
animator.runtimeAnimatorController = Resources.Load("m_Controller") as RuntimeAnimatorController;
walking = false;
}
}
}
}

View File

@@ -12,6 +12,8 @@ public class carcontrolv2 : MonoBehaviour
public float autoBrake;
public AudioSource audio;
WheelControl[] wheels;
public Rigidbody rigidBody;
@@ -107,4 +109,13 @@ public class carcontrolv2 : MonoBehaviour
}
}
}
private void OnCollisionEnter(Collision other) {
if (other.gameObject.tag == "Wall")
{
audio.Play();
}
}
}

8
Assets/Sounds.meta Normal file
View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 68ca8be521b71e9459e4d87197f7f658
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 4e1149ba6d19d1c4281200dde55135e6
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 5ba7fd7ac649c8c49b890d5fa274b554
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 03cf3a122d2eb1c4a80974b0b230c32e
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 4cdee8d2dde23314e80784447bb478b1
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant: