Commit 99efbff4 authored by natonato's avatar natonato

Merge branch 'BS' into ulongcha

parents 2efcc077 1e1153e7
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4a53b7140d8804d48902cc8b4126bfcb guid: f987a037ba06e484c8db4d5ae010f697
AudioImporter: AudioImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 6 serializedVersion: 6
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: a187624ea6c57db43ac585ca043dade4 guid: c221eaf8dc711ad4993c76f0d2e8552e
AudioImporter: AudioImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 6 serializedVersion: 6
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: f02bab0c28ab1334b8e764bf2769b295 guid: 7496b23b2d19dda4d9a81492bae5ab6d
AudioImporter: AudioImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 6 serializedVersion: 6
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 24d63e760facb6b48ba2956444fca90e guid: 57e4a7d0d1a3e834caa7600ebe6832bc
AudioImporter: AudioImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 6 serializedVersion: 6
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 11fcf8cb69c44d747b865748207ce233 guid: a38e743645d4cfd46a7ab3c137a738fa
AudioImporter: AudioImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 6 serializedVersion: 6
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 64410a7adb1f1464a905cc4d6f1687c3 guid: 41741eca352ec594d92c5b669c6ab279
AudioImporter: AudioImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 6 serializedVersion: 6
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: c188195679b510c47a16390d501f813c guid: 3def6dd83cd1bfa44be7b17626eced69
AudioImporter: AudioImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 6 serializedVersion: 6
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!134 &13400000
PhysicMaterial:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Player
dynamicFriction: 1
staticFriction: 1
bounciness: 0
frictionCombine: 0
bounceCombine: 0
fileFormatVersion: 2
guid: f529349e6ff9028458dcf46cb375eb07
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 13400000
userData:
assetBundleName:
assetBundleVariant:
This source diff could not be displayed because it is too large. You can view the blob instead.
fileFormatVersion: 2
guid: d06de160369998643b438095a9d8244e
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &-2174280601035969978
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Recorded
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 270, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 5.016667
value: {x: 313.30518, y: 0, z: 0}
inSlope: {x: -0, y: 0, z: 0}
outSlope: {x: -0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path:
m_PositionCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 0, y: -18.265413, z: -33.95662}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 5.0333333
value: {x: 0, y: -14.679201, z: 8.646366}
inSlope: {x: -0, y: -0, z: -0}
outSlope: {x: -0, y: -0, z: -0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path:
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 1
script: {fileID: 0}
typeID: 4
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 0
attribute: 4
script: {fileID: 0}
typeID: 4
customType: 4
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 5.0333333
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 5.0333333
value: 0
inSlope: -0
outSlope: -0
tangentMode: 1
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.x
path:
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: -18.265413
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 5.0333333
value: -14.679201
inSlope: -0
outSlope: -0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.y
path:
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: -33.95662
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 5.0333333
value: 8.646366
inSlope: -0
outSlope: -0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.z
path:
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 270
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 5.016667
value: 313.30518
inSlope: -0
outSlope: -0
tangentMode: 1
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.x
path:
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 5.016667
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.y
path:
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 5.016667
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.z
path:
classID: 4
script: {fileID: 0}
m_EulerEditorCurves:
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path:
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path:
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path:
classID: 4
script: {fileID: 0}
m_HasGenericRootTransform: 1
m_HasMotionFloatCurves: 0
m_Events: []
--- !u!114 &-1957644662779600916
MonoBehaviour:
m_ObjectHideFlags: 1
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: 11500000, guid: 21bf7f712d84d26478ebe6a299f21738, type: 3}
m_Name: Activation Track
m_EditorClassIdentifier:
m_Version: 3
m_AnimClip: {fileID: 0}
m_Locked: 0
m_Muted: 0
m_CustomPlayableFullTypename:
m_Curves: {fileID: 0}
m_Parent: {fileID: 11400000}
m_Children: []
m_Clips: []
m_Markers:
m_Objects: []
m_PostPlaybackState: 3
--- !u!114 &-45715190028872622
MonoBehaviour:
m_ObjectHideFlags: 1
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: 11500000, guid: d21dcc2386d650c4597f3633c75a1f98, type: 3}
m_Name: Animation Track
m_EditorClassIdentifier:
m_Version: 3
m_AnimClip: {fileID: 0}
m_Locked: 0
m_Muted: 0
m_CustomPlayableFullTypename:
m_Curves: {fileID: 0}
m_Parent: {fileID: 11400000}
m_Children: []
m_Clips: []
m_Markers:
m_Objects: []
m_InfiniteClipPreExtrapolation: 1
m_InfiniteClipPostExtrapolation: 1
m_InfiniteClipOffsetPosition: {x: 0, y: 6.64, z: -5.16}
m_InfiniteClipOffsetEulerAngles: {x: 30.000004, y: 0, z: 0}
m_InfiniteClipTimeOffset: 0
m_InfiniteClipRemoveOffset: 0
m_InfiniteClipApplyFootIK: 1
mInfiniteClipLoop: 0
m_MatchTargetFields: 63
m_Position: {x: 0, y: 0, z: 0}
m_EulerAngles: {x: 0, y: 0, z: 0}
m_AvatarMask: {fileID: 0}
m_ApplyAvatarMask: 1
m_TrackOffset: 0
m_InfiniteClip: {fileID: -2174280601035969978}
m_OpenClipOffsetRotation: {x: 0, y: 0, z: 0, w: 1}
m_Rotation: {x: 0, y: 0, z: 0, w: 1}
m_ApplyOffsets: 0
--- !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: 11500000, guid: bfda56da833e2384a9677cd3c976a436, type: 3}
m_Name: StartTimeline
m_EditorClassIdentifier:
m_Version: 0
m_Tracks:
- {fileID: -45715190028872622}
- {fileID: 420973418332822697}
- {fileID: 3611050369864829875}
m_FixedDuration: 0
m_EditorSettings:
m_Framerate: 60
m_DurationMode: 0
m_MarkerTrack: {fileID: 3032897376781141169}
--- !u!114 &420973418332822697
MonoBehaviour:
m_ObjectHideFlags: 1
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: 11500000, guid: b46e36075dd1c124a8422c228e75e1fb, type: 3}
m_Name: Signal Track
m_EditorClassIdentifier:
m_Version: 3
m_AnimClip: {fileID: 0}
m_Locked: 0
m_Muted: 0
m_CustomPlayableFullTypename:
m_Curves: {fileID: 0}
m_Parent: {fileID: 11400000}
m_Children: []
m_Clips: []
m_Markers:
m_Objects:
- {fileID: 6866499014700386979}
--- !u!114 &3032897376781141169
MonoBehaviour:
m_ObjectHideFlags: 1
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: 11500000, guid: 2a16748d9461eae46a725db9776d5390, type: 3}
m_Name: Markers
m_EditorClassIdentifier:
m_Version: 3
m_AnimClip: {fileID: 0}
m_Locked: 0
m_Muted: 0
m_CustomPlayableFullTypename:
m_Curves: {fileID: 0}
m_Parent: {fileID: 11400000}
m_Children: []
m_Clips: []
m_Markers:
m_Objects: []
--- !u!114 &3611050369864829875
MonoBehaviour:
m_ObjectHideFlags: 1
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: 11500000, guid: b46e36075dd1c124a8422c228e75e1fb, type: 3}
m_Name: Signal Track (1)
m_EditorClassIdentifier:
m_Version: 3
m_AnimClip: {fileID: 0}
m_Locked: 0
m_Muted: 0
m_CustomPlayableFullTypename:
m_Curves: {fileID: 0}
m_Parent: {fileID: 11400000}
m_Children: []
m_Clips: []
m_Markers:
m_Objects:
- {fileID: 5923120744084397383}
--- !u!114 &5923120744084397383
MonoBehaviour:
m_ObjectHideFlags: 1
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: 11500000, guid: 15c38f6fa1940124db1ab7f6fe7268d1, type: 3}
m_Name: Signal Emitter
m_EditorClassIdentifier:
m_Time: 5.966666666666667
m_Retroactive: 0
m_EmitOnce: 0
m_Asset: {fileID: 11400000, guid: 0242a934515cff642a78ec15209a3ba5, type: 2}
--- !u!114 &6866499014700386979
MonoBehaviour:
m_ObjectHideFlags: 1
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: 11500000, guid: 15c38f6fa1940124db1ab7f6fe7268d1, type: 3}
m_Name: Signal Emitter
m_EditorClassIdentifier:
m_Time: 8.533333333333333
m_Retroactive: 0
m_EmitOnce: 0
m_Asset: {fileID: 11400000, guid: 38706e2356d0dca40a5866d8d9df87a2, type: 2}
--- !u!114 &8160627482511577719
MonoBehaviour:
m_ObjectHideFlags: 1
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: 11500000, guid: 15c38f6fa1940124db1ab7f6fe7268d1, type: 3}
m_Name: Signal Emitter
m_EditorClassIdentifier:
m_Time: 4.683333333333334
m_Retroactive: 0
m_EmitOnce: 0
m_Asset: {fileID: 11400000, guid: 38706e2356d0dca40a5866d8d9df87a2, type: 2}
fileFormatVersion: 2
guid: 65c30e43583fa9d49956b1775a871385
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
%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: 11500000, guid: d6fa2d92fc1b3f34da284357edf89c3b, type: 3}
m_Name: ReadySignal
m_EditorClassIdentifier:
fileFormatVersion: 2
guid: 0242a934515cff642a78ec15209a3ba5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -17883,6 +17883,7 @@ MonoBehaviour: ...@@ -17883,6 +17883,7 @@ MonoBehaviour:
comboText: {fileID: 1582354879} comboText: {fileID: 1582354879}
damageText: {fileID: 968624425} damageText: {fileID: 968624425}
OutOfMapWarningUI: {fileID: 204903075} OutOfMapWarningUI: {fileID: 204903075}
distanceText: {fileID: 0}
--- !u!114 &1741517729 --- !u!114 &1741517729
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -18,7 +18,7 @@ MonoBehaviour: ...@@ -18,7 +18,7 @@ MonoBehaviour:
value: 1 value: 1
intensity: intensity:
overrideState: 1 overrideState: 1
value: 17.69 value: 10
threshold: threshold:
overrideState: 0 overrideState: 0
value: 1 value: 1
...@@ -1380,6 +1380,34 @@ MonoBehaviour: ...@@ -1380,6 +1380,34 @@ MonoBehaviour:
sampleCount: sampleCount:
overrideState: 1 overrideState: 1
value: 5 value: 5
--- !u!114 &-7653435643296087632
MonoBehaviour:
m_ObjectHideFlags: 3
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: 11500000, guid: 556797029e73b2347956b6579e77e05b, type: 3}
m_Name: DepthOfField
m_EditorClassIdentifier:
active: 1
enabled:
overrideState: 1
value: 1
focusDistance:
overrideState: 1
value: 5
aperture:
overrideState: 1
value: 7.6
focalLength:
overrideState: 1
value: 67
kernelSize:
overrideState: 1
value: 0
--- !u!114 &11400000 --- !u!114 &11400000
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1397,6 +1425,7 @@ MonoBehaviour: ...@@ -1397,6 +1425,7 @@ MonoBehaviour:
- {fileID: -7753695407939056566} - {fileID: -7753695407939056566}
- {fileID: -8621508592174753373} - {fileID: -8621508592174753373}
- {fileID: 4882075946469032659} - {fileID: 4882075946469032659}
- {fileID: -7653435643296087632}
--- !u!114 &4882075946469032659 --- !u!114 &4882075946469032659
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 3 m_ObjectHideFlags: 3
......
...@@ -26,6 +26,8 @@ public class CameraController : MonoBehaviour ...@@ -26,6 +26,8 @@ public class CameraController : MonoBehaviour
private void Start() private void Start()
{ {
cam = GetComponent<Camera>(); cam = GetComponent<Camera>();
currentX = 0;
currentY = 0;
} }
private void Update() private void Update()
......
...@@ -39,6 +39,8 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager> ...@@ -39,6 +39,8 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager>
[SerializeField] [SerializeField]
private Text OutOfMapWarningUI; private Text OutOfMapWarningUI;
[SerializeField]
private Text distanceText;
public void UpdateTargetLockedUIs(Vector3[] pos) public void UpdateTargetLockedUIs(Vector3[] pos)
{ {
...@@ -151,4 +153,12 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager> ...@@ -151,4 +153,12 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager>
else else
OutOfMapWarningUI.text = string.Format("{0:F1}",remainTime); OutOfMapWarningUI.text = string.Format("{0:F1}",remainTime);
} }
public void UpdateDistanceUI(float distance)
{
if (distance < 0)
distanceText.text = "";
else
distanceText.text = string.Format("{0:F1}", distance) + "m"; ;
}
} }
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
[RequireComponent(typeof(CharacterController))]
public class PlayerController : MonoBehaviour public class PlayerController : MonoBehaviour
{ {
public float distance = 10.0f; public float distance = 10.0f;
...@@ -28,7 +27,8 @@ public class PlayerController : MonoBehaviour ...@@ -28,7 +27,8 @@ public class PlayerController : MonoBehaviour
private bool IsGrounded private bool IsGrounded
{ {
get { get {
return Physics.OverlapSphere(groundChecker.position, 0.2f, groundMask).Length > 0; RaycastHit hit;
return Physics.SphereCast(transform.position, col.radius / 2, Vector3.down, out hit, col.bounds.extents.y + 0.5f, groundMask);
} }
} }
...@@ -55,9 +55,10 @@ public class PlayerController : MonoBehaviour ...@@ -55,9 +55,10 @@ public class PlayerController : MonoBehaviour
Gizmos.color = Color.red; Gizmos.color = Color.red;
Gizmos.DrawLine(transform.position, Camera.main.transform.forward.normalized * 200); Gizmos.DrawLine(transform.position, Camera.main.transform.forward.normalized * 200);
col = GetComponent<CapsuleCollider>();
if (IsGrounded) if (IsGrounded)
Gizmos.color = Color.green; Gizmos.color = Color.green;
Gizmos.DrawSphere(groundChecker.position, 0.1f); Gizmos.DrawSphere(transform.position + Vector3.down * (col.bounds.extents.y + 0.05f), 0.1f);
} }
#endif #endif
...@@ -71,9 +72,6 @@ public class PlayerController : MonoBehaviour ...@@ -71,9 +72,6 @@ public class PlayerController : MonoBehaviour
movement = 0.0f; movement = 0.0f;
animator = GetComponentInChildren<Animator>(); animator = GetComponentInChildren<Animator>();
//col.enabled = !IsGrounded;
//cc.enabled = IsGrounded;
MaxHealth = Health = 100; MaxHealth = Health = 100;
} }
private void Update() private void Update()
...@@ -83,6 +81,14 @@ public class PlayerController : MonoBehaviour ...@@ -83,6 +81,14 @@ public class PlayerController : MonoBehaviour
Animate(vertical, horizontal); Animate(vertical, horizontal);
RaycastHit hit;
if (!hook.gameObject.activeSelf && Physics.Raycast(transform.position, Camera.main.transform.forward, out hit, 700))
{
IngameUIManager.inst.UpdateDistanceUI(Vector3.Distance(transform.position, hit.point));
}
else
IngameUIManager.inst.UpdateDistanceUI(-1);
if (Input.GetMouseButtonDown(1)) if (Input.GetMouseButtonDown(1))
{ {
if (!hook.gameObject.activeSelf) if (!hook.gameObject.activeSelf)
...@@ -95,16 +101,21 @@ public class PlayerController : MonoBehaviour ...@@ -95,16 +101,21 @@ public class PlayerController : MonoBehaviour
if (IsGrounded) if (IsGrounded)
{ {
rb.velocity = (horizontal * transform.right + vertical * transform.forward).normalized * 10.0f; //rb.velocity = Vector3.zero;
transform.position += (horizontal * transform.right + vertical * transform.forward).normalized * 10.0f * Time.deltaTime;
//rb.velocity = (horizontal * transform.right + vertical * transform.forward).normalized * 10.0f;
if (Input.GetButtonDown("Jump")) if (Input.GetButtonDown("Jump"))
rb.velocity += new Vector3(0, 5 -rb.velocity.y, 0); {
rb.velocity = (horizontal * transform.right + vertical * transform.forward).normalized * 5.0f;
rb.velocity += new Vector3(0, 10 - rb.velocity.y, 0);
}
} }
else else
{ {
if (joint.enabled) if (joint.enabled)
joint.moveDelta = (horizontal * transform.right + vertical * transform.forward).normalized * 30.0f; joint.moveDelta = (horizontal * transform.right + vertical * transform.forward).normalized * 30.0f;
else else
rb.AddForce(horizontal * Camera.main.transform.right + vertical * Camera.main.transform.forward * 10.0f); rb.AddForce((horizontal * transform.right + vertical * transform.forward).normalized * 10.0f);
} }
if (MapManager.inst.IsOutOfMapBounds(transform.position)) if (MapManager.inst.IsOutOfMapBounds(transform.position))
...@@ -128,6 +139,20 @@ public class PlayerController : MonoBehaviour ...@@ -128,6 +139,20 @@ public class PlayerController : MonoBehaviour
} }
} }
private void FixedUpdate()
{
/*
if (IsGrounded)
{
RaycastHit hit;
Debug.Log(Physics.Raycast(transform.position, Vector3.down, out hit, groundMask));
Debug.Log(Physics.gravity + " * " + hit.normal + " = " + Vector3.Dot(Physics.gravity, hit.normal));
//Debug.Log(Physics.gravity + Physics.gravity * Vector3.Dot(Physics.gravity, hit.normal));
rb.AddForce(Physics.gravity + Physics.gravity * Vector3.Dot(Physics.gravity, hit.normal));
}
*/
}
private void FireHook() private void FireHook()
{ {
joint.enabled = false; joint.enabled = false;
......
...@@ -24,19 +24,34 @@ public class WeaponBehaviour : MonoBehaviour ...@@ -24,19 +24,34 @@ public class WeaponBehaviour : MonoBehaviour
private ParticleSystem knifeEffect; private ParticleSystem knifeEffect;
[SerializeField] [SerializeField]
private LayerMask enemyMask, blockMask; private LayerMask enemyMask, blockMask;
private IWeapon weapon;
private IWeapon weapon { get { return weaponList[weaponIndex]; } }
private List<IWeapon> weaponList = new List<IWeapon>();
private int weaponIndex = 0;
[SerializeField]
private List<RoundRobin> weaponAudioRRs = new List<RoundRobin>();
private void Start() private void Start()
{ {
weapon = new Gun(gunDamage,gunRange, bulletEffect);
IngameUIManager.inst.UpdateWeaponTypeUI(WeaponType.GUN); IngameUIManager.inst.UpdateWeaponTypeUI(WeaponType.GUN);
weaponList.Add(new Gun(gunDamage, gunRange, bulletEffect));
weaponList.Add(new Knife(knifeDamage, knifeRange, bulletEffect, transform));
} }
private void Update() private void Update()
{
foreach (var weapon in weaponList)
{ {
weapon.UpdateWeapon(); weapon.UpdateWeapon();
}
Enemy[] hitEnemies = weapon.WeaponLockOn(enemyMask, blockMask); Enemy[] hitEnemies = weapon.WeaponLockOn(enemyMask, blockMask);
weapon.UseWeapon(hitEnemies); if (weapon.UseWeapon(hitEnemies))
{
weaponAudioRRs[weaponIndex].Play();
}
if (Input.GetKeyDown(KeyCode.Tab)) if (Input.GetKeyDown(KeyCode.Tab))
{ {
...@@ -50,23 +65,15 @@ public class WeaponBehaviour : MonoBehaviour ...@@ -50,23 +65,15 @@ public class WeaponBehaviour : MonoBehaviour
private void SwapWeapon() private void SwapWeapon()
{ {
if (weapon.GetType() == typeof(Gun)) weaponIndex = (weaponIndex + 1) % 2;
{ IngameUIManager.inst.UpdateWeaponTypeUI((WeaponType)weaponIndex);
weapon = new Knife(knifeDamage, knifeRange, bulletEffect, transform);
IngameUIManager.inst.UpdateWeaponTypeUI(WeaponType.KNIFE);
}
else
{
weapon = new Gun(gunDamage, gunRange, bulletEffect);
IngameUIManager.inst.UpdateWeaponTypeUI(WeaponType.GUN);
}
} }
} }
public interface IWeapon public interface IWeapon
{ {
void UseWeapon(Enemy[] hitEnemies); bool UseWeapon(Enemy[] hitEnemies);
void UseSkill(); void UseSkill();
Enemy[] WeaponLockOn(LayerMask enemyMask, LayerMask blockMask); Enemy[] WeaponLockOn(LayerMask enemyMask, LayerMask blockMask);
void UpdateWeapon(); void UpdateWeapon();
...@@ -89,10 +96,10 @@ public class Gun : IWeapon ...@@ -89,10 +96,10 @@ public class Gun : IWeapon
this.effect = effect; this.effect = effect;
} }
public void UseWeapon(Enemy[] hitEnemies) public bool UseWeapon(Enemy[] hitEnemies)
{ {
if (timer > 0) if (timer > 0)
return; return false;
if (Input.GetMouseButton(0)) if (Input.GetMouseButton(0))
{ {
effect.transform.rotation = Camera.main.transform.rotation; effect.transform.rotation = Camera.main.transform.rotation;
...@@ -103,7 +110,9 @@ public class Gun : IWeapon ...@@ -103,7 +110,9 @@ public class Gun : IWeapon
IngameUIManager.inst.UpdateComboUI(weaponDamage); IngameUIManager.inst.UpdateComboUI(weaponDamage);
} }
timer = gunShotInterval; timer = gunShotInterval;
return true;
} }
return false;
} }
public Enemy[] WeaponLockOn(LayerMask enemyMask, LayerMask blockMask) public Enemy[] WeaponLockOn(LayerMask enemyMask, LayerMask blockMask)
...@@ -156,7 +165,7 @@ public class Knife : IWeapon ...@@ -156,7 +165,7 @@ public class Knife : IWeapon
this.player = player; this.player = player;
} }
public void UseWeapon(Enemy[] hitEnemies) public bool UseWeapon(Enemy[] hitEnemies)
{ {
if (Input.GetMouseButtonDown(0)) if (Input.GetMouseButtonDown(0))
{ {
...@@ -169,7 +178,9 @@ public class Knife : IWeapon ...@@ -169,7 +178,9 @@ public class Knife : IWeapon
if (enemy.IsDead) if (enemy.IsDead)
skillTimer = 0; skillTimer = 0;
} }
return true;
} }
return false;
} }
public Enemy[] WeaponLockOn(LayerMask enemyMask, LayerMask blockMask) public Enemy[] WeaponLockOn(LayerMask enemyMask, LayerMask blockMask)
......
%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: 11500000, guid: d6fa2d92fc1b3f34da284357edf89c3b, type: 3}
m_Name: StartSignal
m_EditorClassIdentifier:
fileFormatVersion: 2
guid: 38706e2356d0dca40a5866d8d9df87a2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
...@@ -18,7 +18,7 @@ TagManager: ...@@ -18,7 +18,7 @@ TagManager:
- PlayerPassable - PlayerPassable
- Enemy - Enemy
- Terrain - Terrain
- - PostProcessing
- -
- -
- -
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment