add sound to platform and repair deleting and edit jump and move
This commit is contained in:
parent
dbe10318e1
commit
6f71f6225e
@ -1606,7 +1606,7 @@ Rigidbody:
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 112
|
||||
m_CollisionDetection: 2
|
||||
m_CollisionDetection: 1
|
||||
--- !u!114 &3244356566819001086
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -98,6 +98,7 @@ GameObject:
|
||||
- component: {fileID: 1430690303722568316}
|
||||
- component: {fileID: 8238111678033492397}
|
||||
- component: {fileID: -5509448037057392871}
|
||||
- component: {fileID: 2527761051471871889}
|
||||
m_Layer: 0
|
||||
m_Name: Platform_Blue
|
||||
m_TagString: platform
|
||||
@ -201,6 +202,11 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
type: 2
|
||||
speed: 20
|
||||
audioSource: {fileID: 2527761051471871889}
|
||||
audioClips:
|
||||
- {fileID: 8300000, guid: e25b1f5c308fe154a8d7203703e2f298, type: 3}
|
||||
- {fileID: 8300000, guid: 069524b961ce90248975f0b336aaa1ea, type: 3}
|
||||
- {fileID: 8300000, guid: 8bdd4da8e56531349a71d10986d156ae, type: 3}
|
||||
--- !u!65 &8238111678033492397
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -208,7 +214,7 @@ BoxCollider:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8768991388683709947}
|
||||
m_Material: {fileID: 13400000, guid: 055b414bc685d41409a41f4ea2d64231, type: 2}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
@ -226,3 +232,99 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 61dae18984b7ff147ab1d77fb817687a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!82 &2527761051471871889
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8768991388683709947}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 0.3
|
||||
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
|
||||
|
@ -202,6 +202,8 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
type: 0
|
||||
speed: 5
|
||||
audioSource: {fileID: 0}
|
||||
audioClips: []
|
||||
--- !u!65 &3865253352867341094
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -209,7 +211,7 @@ BoxCollider:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8768991388683709947}
|
||||
m_Material: {fileID: 13400000, guid: 055b414bc685d41409a41f4ea2d64231, type: 2}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
|
@ -114,6 +114,7 @@ GameObject:
|
||||
- component: {fileID: 1183598848765291555}
|
||||
- component: {fileID: 6218203028538785626}
|
||||
- component: {fileID: 1204402889283165505}
|
||||
- component: {fileID: 7973800414101489524}
|
||||
m_Layer: 0
|
||||
m_Name: Platform_Orange
|
||||
m_TagString: platform
|
||||
@ -201,6 +202,12 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
type: 6
|
||||
speed: 10
|
||||
audioSource: {fileID: 7973800414101489524}
|
||||
audioClips:
|
||||
- {fileID: 8300000, guid: 0f9bc2d26d3715c42addd8d0afbe743f, type: 3}
|
||||
- {fileID: 8300000, guid: df1b4f1fff31d34448627e9a2f26eb49, type: 3}
|
||||
- {fileID: 8300000, guid: bc1f76da471aaa0428b17fae63dc7070, type: 3}
|
||||
- {fileID: 8300000, guid: 497af8c6f4c09474f9934696a2a41a40, type: 3}
|
||||
--- !u!65 &6218203028538785626
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -208,7 +215,7 @@ BoxCollider:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6650340373999088090}
|
||||
m_Material: {fileID: 13400000, guid: 055b414bc685d41409a41f4ea2d64231, type: 2}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
@ -226,3 +233,99 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 61dae18984b7ff147ab1d77fb817687a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!82 &7973800414101489524
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6650340373999088090}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 0.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
|
||||
|
@ -114,6 +114,7 @@ GameObject:
|
||||
- component: {fileID: 3861707493128515586}
|
||||
- component: {fileID: 5316890779910729157}
|
||||
- component: {fileID: -142748814437030588}
|
||||
- component: {fileID: 5862113707430629064}
|
||||
m_Layer: 0
|
||||
m_Name: Platform_Red
|
||||
m_TagString: platform
|
||||
@ -200,7 +201,12 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
type: 1
|
||||
speed: 5
|
||||
speed: 10
|
||||
audioSource: {fileID: 5862113707430629064}
|
||||
audioClips:
|
||||
- {fileID: 8300000, guid: e25b1f5c308fe154a8d7203703e2f298, type: 3}
|
||||
- {fileID: 8300000, guid: 069524b961ce90248975f0b336aaa1ea, type: 3}
|
||||
- {fileID: 8300000, guid: 8bdd4da8e56531349a71d10986d156ae, type: 3}
|
||||
--- !u!65 &5316890779910729157
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -208,7 +214,7 @@ BoxCollider:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8768991388683709947}
|
||||
m_Material: {fileID: 13400000, guid: 055b414bc685d41409a41f4ea2d64231, type: 2}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
@ -226,3 +232,99 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 61dae18984b7ff147ab1d77fb817687a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!82 &5862113707430629064
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8768991388683709947}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 0.3
|
||||
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
|
||||
|
@ -114,6 +114,7 @@ GameObject:
|
||||
- component: {fileID: 7821003709828495146}
|
||||
- component: {fileID: 4344779564172896453}
|
||||
- component: {fileID: 5433657018731068073}
|
||||
- component: {fileID: 8383421295717427161}
|
||||
m_Layer: 0
|
||||
m_Name: Platform_yellow
|
||||
m_TagString: platform
|
||||
@ -201,6 +202,12 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
type: 5
|
||||
speed: 10
|
||||
audioSource: {fileID: 8383421295717427161}
|
||||
audioClips:
|
||||
- {fileID: 8300000, guid: 42674630e9bd347408c6a2e84b1cc948, type: 3}
|
||||
- {fileID: 8300000, guid: e92cb7ffeb685484fb49188542ab07a0, type: 3}
|
||||
- {fileID: 8300000, guid: 4285bbaea081a6f4490fd8a485408977, type: 3}
|
||||
- {fileID: 8300000, guid: a9f86995a34d2594c8688021b82a4fbe, type: 3}
|
||||
--- !u!65 &4344779564172896453
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -208,7 +215,7 @@ BoxCollider:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8768991388683709947}
|
||||
m_Material: {fileID: 13400000, guid: 055b414bc685d41409a41f4ea2d64231, type: 2}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
@ -226,3 +233,99 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 61dae18984b7ff147ab1d77fb817687a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!82 &8383421295717427161
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8768991388683709947}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 0.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
|
||||
|
@ -177,7 +177,7 @@ BoxCollider:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7678802340880963262}
|
||||
m_Material: {fileID: 13400000, guid: 055b414bc685d41409a41f4ea2d64231, type: 2}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
@ -197,6 +197,8 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
type: 0
|
||||
speed: 5
|
||||
audioSource: {fileID: 0}
|
||||
audioClips: []
|
||||
--- !u!114 &-731181381576803345
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -7,6 +7,8 @@ public class PlatformManager : MonoBehaviour
|
||||
public enum PlatformType {Basic, Pull, Push, RotateZ, RotateY, SpeedUp, SpeedDown};
|
||||
public PlatformType type = PlatformType.Pull;
|
||||
public float speed = 5;
|
||||
public AudioSource audioSource;
|
||||
public List<AudioClip> audioClips = new List<AudioClip>();
|
||||
|
||||
void FixedUpdate()
|
||||
{
|
||||
@ -17,4 +19,12 @@ public class PlatformManager : MonoBehaviour
|
||||
transform.Rotate(transform.up * speed * Time.deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
public void Step()
|
||||
{
|
||||
if (audioSource != null && audioClips.Count > 0 && !audioSource.isPlaying)
|
||||
{
|
||||
audioSource.PlayOneShot(audioClips[Random.Range(0, audioClips.Count)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
|
||||
float curSpeedX = canMove ? (currentSpeed + speedModifier) : 0;
|
||||
float curSpeedY = canMove ? (currentSpeed + 3.5f + speedModifier) * Input.GetAxis("Horizontal") : 0;
|
||||
float curSpeedY = canMove ? (currentSpeed + 5f + speedModifier) * Input.GetAxis("Horizontal") : 0;
|
||||
|
||||
moveDirection = (platformForward * curSpeedX * Time.deltaTime) + (transform.right * curSpeedY * Time.deltaTime);
|
||||
|
||||
@ -105,7 +105,7 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
|
||||
if (audioSource != null && audioClips.Count > 0) {
|
||||
if ((currentSpeed + speedModifier) > speed * 3f && (currentSpeed + speedModifier) < speed * 7f)
|
||||
if ((currentSpeed + speedModifier) > speed * 3f && (currentSpeed + speedModifier) < speed * 6f)
|
||||
{
|
||||
if (audioClips.Count > 1 && audioSource.clip != audioClips[1]) {
|
||||
audioSource.Stop();
|
||||
@ -118,7 +118,7 @@ public class PlayerController : MonoBehaviour
|
||||
audioSource.clip = audioClips[0];
|
||||
audioSource.Play();
|
||||
}
|
||||
} else if ((currentSpeed + speedModifier) >= speed * 7f) {
|
||||
} else if ((currentSpeed + speedModifier) >= speed * 6f) {
|
||||
if (audioClips.Count > 2 && audioSource.clip != audioClips[2])
|
||||
{
|
||||
audioSource.Stop();
|
||||
@ -136,7 +136,7 @@ public class PlayerController : MonoBehaviour
|
||||
if (inAir)
|
||||
{
|
||||
// Debug.Log("Jump");
|
||||
rb.AddForce(transform.up * jumpSpeed * 100 * Time.deltaTime, ForceMode.Impulse);
|
||||
rb.AddForce(transform.up * jumpSpeed * 100f * Time.deltaTime, ForceMode.Impulse);
|
||||
inAir = false;
|
||||
}
|
||||
|
||||
@ -219,10 +219,10 @@ public class PlayerController : MonoBehaviour
|
||||
|
||||
if (other.GetContact(0).normal == other.transform.forward
|
||||
|| other.GetContact(0).normal == -other.transform.forward
|
||||
|| other.GetContact(0).normal == -other.transform.right
|
||||
|| other.GetContact(0).normal == other.transform.right
|
||||
|| (other.GetContact(0).normal != -other.transform.up
|
||||
&& other.GetContact(0).normal != other.transform.up
|
||||
&& other.GetContact(0).normal != other.transform.right
|
||||
&& other.GetContact(0).normal != -other.transform.right)
|
||||
&& other.GetContact(0).normal != other.transform.up)
|
||||
)
|
||||
{
|
||||
return;
|
||||
@ -240,24 +240,10 @@ public class PlayerController : MonoBehaviour
|
||||
isGrounded = true;
|
||||
if (other.gameObject.tag == "platform")
|
||||
{
|
||||
|
||||
if (other.GetContact(0).normal == other.transform.forward
|
||||
|| other.GetContact(0).normal == -other.transform.forward
|
||||
|| (other.GetContact(0).normal != -other.transform.up
|
||||
&& other.GetContact(0).normal != other.transform.up
|
||||
&& other.GetContact(0).normal != other.transform.right
|
||||
&& other.GetContact(0).normal != -other.transform.right)
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
saveDirection = -other.GetContact(0).normal;
|
||||
|
||||
Vector3 gDirection = -other.GetContact(0).normal;
|
||||
PlatformManager platform = other.gameObject.GetComponent<PlatformManager>();
|
||||
if (platform != null)
|
||||
{
|
||||
platform.Step();
|
||||
switch (platform.type)
|
||||
{
|
||||
case PlatformManager.PlatformType.Push:
|
||||
@ -285,14 +271,24 @@ public class PlayerController : MonoBehaviour
|
||||
speedModifier = 0.0f;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
gDirection = -other.GetContact(0).normal;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (other.GetContact(0).normal == other.transform.forward
|
||||
|| other.GetContact(0).normal == -other.transform.forward
|
||||
|| other.GetContact(0).normal == -other.transform.right
|
||||
|| other.GetContact(0).normal == other.transform.right
|
||||
|| (other.GetContact(0).normal != -other.transform.up
|
||||
&& other.GetContact(0).normal != other.transform.up)
|
||||
)
|
||||
{
|
||||
gDirection = -transform.up;
|
||||
return;
|
||||
}
|
||||
|
||||
Vector3 gDirection = -other.GetContact(0).normal;
|
||||
saveDirection = gDirection;
|
||||
if (platform == null)
|
||||
{
|
||||
gDirection = -other.GetContact(0).normal;
|
||||
}
|
||||
platformForward = other.transform.forward;
|
||||
this.downDirection = gDirection;
|
||||
|
@ -47,7 +47,7 @@ public class ProceduralGeneration : MonoBehaviour
|
||||
List<GameObject> spawnSpiralOfPlatforms(GameObject lastObject, GameObject objToSpawn, GameObject parentLevelObject)
|
||||
{
|
||||
// configuration:
|
||||
float horizontalDistancePerPlatform = (float)Random.Range(0.5f, 2.0f);
|
||||
float horizontalDistancePerPlatform = (float)Random.Range(1.0f, 3.0f);
|
||||
|
||||
List<GameObject> levelBlocksSpawnTemp = new List<GameObject>();
|
||||
// Debug.Log("Building LOOP");
|
||||
@ -102,7 +102,7 @@ public class ProceduralGeneration : MonoBehaviour
|
||||
for (var i = 0; i < this.spawnedLevelBlocks.Count; i++)
|
||||
{
|
||||
float distance = Vector3.Distance(this.spawnedLevelBlocks[i].transform.position, playerPosition);
|
||||
if (distance > this.maximumDistanceOfPlatformFromPlayer && this.spawnedLevelBlocks.Count >= this.maximumNumberOfPlatformsAtScene)
|
||||
if (distance > this.maximumDistanceOfPlatformFromPlayer && this.spawnedLevelBlocks.Count >= this.maximumNumberOfPlatformsAtScene && playerPosition.z > this.spawnedLevelBlocks[i].transform.position.z)
|
||||
{
|
||||
Destroy(this.spawnedLevelBlocks[i]);
|
||||
this.spawnedLevelBlocks.Remove(this.spawnedLevelBlocks[i]);
|
||||
|
8
Assets/Sounds/Magnets.meta
Normal file
8
Assets/Sounds/Magnets.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6f7627d76e56c724b978e5b6e15a6e6d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/Magnets/Magnet01.mp3
Normal file
BIN
Assets/Sounds/Magnets/Magnet01.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/Magnets/Magnet01.mp3.meta
Normal file
22
Assets/Sounds/Magnets/Magnet01.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e25b1f5c308fe154a8d7203703e2f298
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/Magnets/Magnet02.mp3
Normal file
BIN
Assets/Sounds/Magnets/Magnet02.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/Magnets/Magnet02.mp3.meta
Normal file
22
Assets/Sounds/Magnets/Magnet02.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 069524b961ce90248975f0b336aaa1ea
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/Magnets/Magnet03.mp3
Normal file
BIN
Assets/Sounds/Magnets/Magnet03.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/Magnets/Magnet03.mp3.meta
Normal file
22
Assets/Sounds/Magnets/Magnet03.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8bdd4da8e56531349a71d10986d156ae
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Sounds/SlowDown.meta
Normal file
8
Assets/Sounds/SlowDown.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc9bdfba777b8fe459f8df308f1abf8b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/SlowDown/SlowDown01.mp3
Normal file
BIN
Assets/Sounds/SlowDown/SlowDown01.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/SlowDown/SlowDown01.mp3.meta
Normal file
22
Assets/Sounds/SlowDown/SlowDown01.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f9bc2d26d3715c42addd8d0afbe743f
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/SlowDown/SlowDown02.mp3
Normal file
BIN
Assets/Sounds/SlowDown/SlowDown02.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/SlowDown/SlowDown02.mp3.meta
Normal file
22
Assets/Sounds/SlowDown/SlowDown02.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df1b4f1fff31d34448627e9a2f26eb49
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/SlowDown/SlowDown03.mp3
Normal file
BIN
Assets/Sounds/SlowDown/SlowDown03.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/SlowDown/SlowDown03.mp3.meta
Normal file
22
Assets/Sounds/SlowDown/SlowDown03.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc1f76da471aaa0428b17fae63dc7070
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/SlowDown/SlowDown04.mp3
Normal file
BIN
Assets/Sounds/SlowDown/SlowDown04.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/SlowDown/SlowDown04.mp3.meta
Normal file
22
Assets/Sounds/SlowDown/SlowDown04.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 497af8c6f4c09474f9934696a2a41a40
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Sounds/SpeedUp.meta
Normal file
8
Assets/Sounds/SpeedUp.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f252e5f5885a5f49bb259dedb2fe565
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/SpeedUp/SpeedUp01.mp3
Normal file
BIN
Assets/Sounds/SpeedUp/SpeedUp01.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/SpeedUp/SpeedUp01.mp3.meta
Normal file
22
Assets/Sounds/SpeedUp/SpeedUp01.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42674630e9bd347408c6a2e84b1cc948
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/SpeedUp/SpeedUp02.mp3
Normal file
BIN
Assets/Sounds/SpeedUp/SpeedUp02.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/SpeedUp/SpeedUp02.mp3.meta
Normal file
22
Assets/Sounds/SpeedUp/SpeedUp02.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e92cb7ffeb685484fb49188542ab07a0
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/SpeedUp/SpeedUp03.mp3
Normal file
BIN
Assets/Sounds/SpeedUp/SpeedUp03.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/SpeedUp/SpeedUp03.mp3.meta
Normal file
22
Assets/Sounds/SpeedUp/SpeedUp03.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4285bbaea081a6f4490fd8a485408977
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Sounds/SpeedUp/SpeedUp04.mp3
Normal file
BIN
Assets/Sounds/SpeedUp/SpeedUp04.mp3
Normal file
Binary file not shown.
22
Assets/Sounds/SpeedUp/SpeedUp04.mp3.meta
Normal file
22
Assets/Sounds/SpeedUp/SpeedUp04.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a9f86995a34d2594c8688021b82a4fbe
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user