Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
man-in-the-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MIM
man-in-the-mirror
Commits
ba6b0e6d
Commit
ba6b0e6d
authored
Jun 07, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
플레이어 총알 쏘기 완료, 머지 완료
parent
7f097902
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
533 deletions
+37
-533
jackson.prefab
Assets/Prefabs/MapObjects/jackson.prefab
+5
-3
Player.prefab
Assets/Prefabs/Player.prefab
+0
-179
Player.prefab.meta
Assets/Prefabs/Player.prefab.meta
+0
-7
ModelScene.meta
Assets/Scenes/ModelScene.meta
+0
-8
ModelScene.unity
Assets/Scenes/ModelScene.unity
+16
-328
CameraController.cs
Assets/Scripts/CameraController.cs
+2
-2
Player.cs
Assets/Scripts/Player.cs
+3
-1
PlayerController.cs
Assets/Scripts/PlayerController.cs
+11
-5
No files found.
Assets/Prefabs/MapObjects/jackson.prefab
View file @
ba6b0e6d
...
...
@@ -1432,8 +1432,10 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
head
:
{
fileID
:
3233955354714130270
}
shootingArm
:
{
fileID
:
494213313239917623
}
shootingArm
:
{
fileID
:
7838800661811206189
}
shootingFinger
:
{
fileID
:
494213313239918045
}
armRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
0
}
currentFloor
:
{
fileID
:
0
}
---
!u!1
&494213313239918029
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -2122,14 +2124,14 @@ Transform:
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
494213313239918065
}
m_LocalRotation
:
{
x
:
-0.0
46910297
,
y
:
-0.005540491
,
z
:
-0.012098737
,
w
:
0.99881047
}
m_LocalRotation
:
{
x
:
-0.0
59248388
,
y
:
-0.0022251606
,
z
:
0.02602184
,
w
:
0.99790156
}
m_LocalPosition
:
{
x
:
6.938353e-10
,
y
:
0.0029668214
,
z
:
-8.381903e-11
}
m_LocalScale
:
{
x
:
0.99999994
,
y
:
1.0000002
,
z
:
1.0000001
}
m_Children
:
-
{
fileID
:
494213313239497103
}
m_Father
:
{
fileID
:
494213313239496727
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalEulerAnglesHint
:
{
x
:
-6.7840004
,
y
:
-0.43400002
,
z
:
3.0130002
}
---
!u!1
&494213313239918067
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/Prefabs/Player.prefab
deleted
100644 → 0
View file @
7f097902
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!1
&5325636473742838123
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
995136353672390943
}
m_Layer
:
0
m_Name
:
Head
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&995136353672390943
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
5325636473742838123
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.75
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
8862060874303168219
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&8862060874303168220
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
8862060874303168219
}
-
component
:
{
fileID
:
8862060874303168216
}
-
component
:
{
fileID
:
8862060874303168217
}
-
component
:
{
fileID
:
8862060874303168222
}
-
component
:
{
fileID
:
857076055737488221
}
-
component
:
{
fileID
:
8862060874303168218
}
-
component
:
{
fileID
:
5785432140392015245
}
m_Layer
:
8
m_Name
:
Player
m_TagString
:
Player
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&8862060874303168219
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
8862060874303168220
}
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
:
995136353672390943
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!33
&8862060874303168216
MeshFilter
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
8862060874303168220
}
m_Mesh
:
{
fileID
:
10208
,
guid
:
0000000000000000e000000000000000
,
type
:
0
}
---
!u!23
&8862060874303168217
MeshRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
8862060874303168220
}
m_Enabled
:
1
m_CastShadows
:
1
m_ReceiveShadows
:
1
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_RenderingLayerMask
:
1
m_RendererPriority
:
0
m_Materials
:
-
{
fileID
:
2100002
,
guid
:
21bb8ae9866c4304198832331df496dc
,
type
:
3
}
m_StaticBatchInfo
:
firstSubMesh
:
0
subMeshCount
:
0
m_StaticBatchRoot
:
{
fileID
:
0
}
m_ProbeAnchor
:
{
fileID
:
0
}
m_LightProbeVolumeOverride
:
{
fileID
:
0
}
m_ScaleInLightmap
:
1
m_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
m_StitchLightmapSeams
:
0
m_SelectedEditorRenderState
:
3
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingOrder
:
0
---
!u!136
&8862060874303168222
CapsuleCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
8862060874303168220
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
0
m_Enabled
:
1
m_Radius
:
0.5
m_Height
:
2
m_Direction
:
1
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&857076055737488221
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
8862060874303168220
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
ceb8a784e77658342887555993532b12
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
head
:
{
fileID
:
5325636473742838123
}
---
!u!195
&8862060874303168218
NavMeshAgent
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
8862060874303168220
}
m_Enabled
:
0
m_AgentTypeID
:
0
m_Radius
:
0.5
m_Speed
:
5
m_Acceleration
:
1000
avoidancePriority
:
50
m_AngularSpeed
:
300
m_StoppingDistance
:
0
m_AutoTraverseOffMeshLink
:
1
m_AutoBraking
:
1
m_AutoRepath
:
1
m_Height
:
2
m_BaseOffset
:
1
m_WalkableMask
:
4294967295
m_ObstacleAvoidanceType
:
4
---
!u!208
&5785432140392015245
NavMeshObstacle
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
8862060874303168220
}
m_Enabled
:
1
serializedVersion
:
3
m_Shape
:
1
m_Extents
:
{
x
:
0.5
,
y
:
1
,
z
:
0.5
}
m_MoveThreshold
:
0.1
m_Carve
:
1
m_CarveOnlyStationary
:
0
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_TimeToStationary
:
0.5
Assets/Prefabs/Player.prefab.meta
deleted
100644 → 0
View file @
7f097902
fileFormatVersion: 2
guid: 6ba287375b5ad4b458a7b7b99c6d6a08
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scenes/ModelScene.meta
deleted
100644 → 0
View file @
7f097902
fileFormatVersion: 2
guid: ae6df86ab9243f74f8c5e9aab2cbca92
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scenes/ModelScene.unity
View file @
ba6b0e6d
This diff is collapsed.
Click to expand it.
Assets/Scripts/CameraController.cs
View file @
ba6b0e6d
...
...
@@ -8,7 +8,7 @@ public class CameraController : MonoBehaviour
public
float
dragSpeed
;
Vector3
previousPos
;
Vector3
previousAngle
;
float
shootingFov
=
4
0f
;
float
shootingFov
=
6
0f
;
float
mapFov
=
20f
;
float
rotationX
=
0
;
float
rotationY
=
0
;
...
...
@@ -135,7 +135,7 @@ public class CameraController : MonoBehaviour
float
mouseMoveValueY
=
Input
.
GetAxis
(
"Mouse Y"
);
rotationX
+=
mouseMoveValueX
*
sensitivity
*
Time
.
deltaTime
;
rotationY
+=
mouseMoveValueY
*
sensitivity
*
Time
.
deltaTime
;
rotationY
=
Mathf
.
Clamp
(
rotationY
,
-
50
,
2
0
);
rotationY
=
Mathf
.
Clamp
(
rotationY
,
-
20
,
1
0
);
transform
.
eulerAngles
=
new
Vector3
(-
rotationY
,
rotationX
,
0
);
}
}
...
...
Assets/Scripts/Player.cs
View file @
ba6b0e6d
...
...
@@ -12,8 +12,9 @@ public class Player : MonoBehaviour
Coroutine
playerArrivalCheck
;
public
GameObject
head
;
public
GameObject
shootingArm
;
public
Transform
shootingArm
;
public
GameObject
shootingFinger
;
public
Quaternion
armRotation
;
Animator
anim
;
public
Floor
currentFloor
;
...
...
@@ -110,6 +111,7 @@ public class Player : MonoBehaviour
void
Start
()
{
anim
=
GetComponent
<
Animator
>();
armRotation
=
shootingArm
.
rotation
;
}
// Update is called once per frame
...
...
Assets/Scripts/PlayerController.cs
View file @
ba6b0e6d
...
...
@@ -148,12 +148,18 @@ public class PlayerController : SingletonBehaviour<PlayerController>
void
LateUpdate
()
{
if
(
currentPlayer
!=
null
&&
currentPlayer
.
GetComponent
<
NavMeshAgent
>().
velocity
.
magnitude
>
0
)
transform
.
rotation
=
Quaternion
.
LookRotation
(
currentPlayer
.
GetComponent
<
NavMeshAgent
>().
velocity
.
normalized
);
if
(
isPlayerShooting
)
if
(
currentPlayer
!=
null
)
{
Quaternion
destinationRotation
=
Quaternion
.
Euler
(
new
Vector3
(
transform
.
eulerAngles
.
x
,
Camera
.
main
.
transform
.
eulerAngles
.
y
,
currentPlayer
.
transform
.
eulerAngles
.
z
));
currentPlayer
.
transform
.
rotation
=
Quaternion
.
Lerp
(
currentPlayer
.
transform
.
rotation
,
destinationRotation
,
Time
.
deltaTime
*
10
);
if
(
currentPlayer
.
GetComponent
<
NavMeshAgent
>().
velocity
.
magnitude
>
0
)
transform
.
rotation
=
Quaternion
.
LookRotation
(
currentPlayer
.
GetComponent
<
NavMeshAgent
>().
velocity
.
normalized
);
if
(
isPlayerShooting
)
{
Quaternion
destinationRotation
=
Quaternion
.
Euler
(
new
Vector3
(
transform
.
eulerAngles
.
x
,
Camera
.
main
.
transform
.
eulerAngles
.
y
,
currentPlayer
.
transform
.
eulerAngles
.
z
));
currentPlayer
.
transform
.
rotation
=
Quaternion
.
Lerp
(
currentPlayer
.
transform
.
rotation
,
destinationRotation
,
Time
.
deltaTime
*
10
);
currentPlayer
.
shootingArm
.
LookAt
(
Camera
.
main
.
transform
.
forward
+
Camera
.
main
.
transform
.
position
);
}
else
currentPlayer
.
shootingArm
.
rotation
=
currentPlayer
.
armRotation
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment