Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RhythmKata
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
13정준영
RhythmKata
Commits
43a5c014
Commit
43a5c014
authored
Nov 22, 2019
by
15박보승
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
카메라 쉐이크 구현
parent
a484254b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
90 deletions
+81
-90
LightRod.mat
RhythmKata/Assets/Materials/LightRod.mat
+1
-1
mergescene.unity
RhythmKata/Assets/Scenes/mergescene.unity
+20
-89
CameraController.cs
RhythmKata/Assets/Scripts/CameraController.cs
+49
-0
CameraController.cs.meta
RhythmKata/Assets/Scripts/CameraController.cs.meta
+11
-0
No files found.
RhythmKata/Assets/Materials/LightRod.mat
View file @
43a5c014
...
...
@@ -74,5 +74,5 @@ Material:
-
_UVSec
:
0
-
_ZWrite
:
0
m_Colors
:
-
_Color
:
{
r
:
0.297169
7
,
g
:
1
,
b
:
0.89210325
,
a
:
0.69411767
}
-
_Color
:
{
r
:
0.297169
66
,
g
:
1
,
b
:
0.89210325
,
a
:
0.13333334
}
-
_EmissionColor
:
{
r
:
0.5235849
,
g
:
0.9332501
,
b
:
1
,
a
:
1
}
RhythmKata/Assets/Scenes/mergescene.unity
View file @
43a5c014
...
...
@@ -496,6 +496,24 @@ RectTransform:
m_AnchoredPosition
:
{
x
:
-200
,
y
:
0
}
m_SizeDelta
:
{
x
:
100
,
y
:
100
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!1
&289544609
stripped
GameObject
:
m_CorrespondingSourceObject
:
{
fileID
:
110716
,
guid
:
dc06161b6d97feb419f45f03b62e14b9
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
313073069
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!114
&289544611
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
289544609
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
05cd823509a710b49bed1a674c752d76
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
---
!u!1001
&313073069
PrefabInstance
:
m_ObjectHideFlags
:
0
...
...
@@ -783,37 +801,6 @@ MonoBehaviour:
type
:
3
}
scoreText
:
{
fileID
:
1245177463
}
comboText
:
{
fileID
:
150320123
}
---
!u!1
&664074202
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
341502039
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
664074203
}
m_Layer
:
0
m_Name
:
Tunnel (1) (Missing Prefab)
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&664074203
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
341502039
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
664074202
}
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
:
2112533739
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&786032836
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -912,36 +899,6 @@ GameObject:
type
:
3
}
m_PrefabInstance
:
{
fileID
:
313073069
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1
&1001713519
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
23206332
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
1001713520
}
m_Layer
:
0
m_Name
:
Tunnel (Missing Prefab)
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&1001713520
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
23206332
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1001713519
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&1011486258
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1482,7 +1439,7 @@ MeshRenderer:
m_RenderingLayerMask
:
1
m_RendererPriority
:
0
m_Materials
:
-
{
fileID
:
2100000
,
guid
:
abd8ab022744118478ca452fd7495d16
,
type
:
2
}
-
{
fileID
:
2100000
,
guid
:
57b508a50a2d9664fb693652c022ce9a
,
type
:
2
}
m_StaticBatchInfo
:
firstSubMesh
:
0
subMeshCount
:
0
...
...
@@ -1525,24 +1482,12 @@ Transform:
m_Father
:
{
fileID
:
2128700929
}
m_RootOrder
:
2
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&2112533737
---
!u!1
&2112533737
stripped
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
-927199367670048503
,
guid
:
183d1d3e655e0294c8f38c5b687642a8
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
341502039
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
2112533739
}
-
component
:
{
fileID
:
2112533738
}
m_Layer
:
0
m_Name
:
Missing Prefab (Dummy)
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
---
!u!114
&2112533738
MonoBehaviour
:
m_ObjectHideFlags
:
0
...
...
@@ -1556,20 +1501,6 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
incr
:
1
---
!u!4
&2112533739
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
341502039
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
2112533737
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
664074203
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&2128700928
GameObject
:
m_ObjectHideFlags
:
0
...
...
RhythmKata/Assets/Scripts/CameraController.cs
0 → 100644
View file @
43a5c014
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
CameraController
:
MonoBehaviour
{
// Start is called before the first frame update
void
Start
()
{
}
// Update is called once per frame
void
Update
()
{
if
(
Input
.
GetMouseButtonDown
(
0
))
{
CameraShake
(
0.2f
,
0.1f
);
}
}
private
void
OnDrawGizmos
()
{
Gizmos
.
DrawWireSphere
(
transform
.
position
,
0.05f
);
}
private
void
CameraShake
(
float
amount
,
float
time
)
{
StartCoroutine
(
CameraShaking
(
amount
,
time
));
}
private
IEnumerator
CameraShaking
(
float
amount
,
float
time
)
{
Vector3
oriPos
=
transform
.
position
;
Debug
.
Log
(
oriPos
);
float
oriAmount
=
amount
;
float
oriTime
=
time
;
for
(
float
t
=
0
;
t
<
time
;
t
+=
Time
.
deltaTime
)
{
Vector3
randVec
=
UnityEngine
.
Random
.
insideUnitSphere
;
amount
=
oriAmount
*
((
time
-
t
)
/
oriTime
);
transform
.
position
=
oriPos
+
randVec
*
amount
;
yield
return
new
WaitForEndOfFrame
();
}
transform
.
position
=
oriPos
;
}
}
RhythmKata/Assets/Scripts/CameraController.cs.meta
0 → 100644
View file @
43a5c014
fileFormatVersion: 2
guid: 05cd823509a710b49bed1a674c752d76
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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