Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
LSK_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
고다경
2020-06-12 01:22:21 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f32ebe154dd558787b3a5f2722a4d344296c79fe
f32ebe15
1 parent
3a258043
Intro Scene에서 Quad를 GameObject follow로 수정 후 움직임 구현
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
sourcecode/capstone/Assets/Scenes/Intro.unity
sourcecode/capstone/Assets/Script/DetectJoints.cs
sourcecode/capstone/Assets/Script/Title.cs
sourcecode/capstone/Assets/Scenes/Intro.unity
View file @
f32ebe1
...
...
@@ -743,15 +743,15 @@ RectTransform:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1153664853
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
50
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
15
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
200
}
m_Children
:
[]
m_Father
:
{
fileID
:
1190618928
}
m_RootOrder
:
4
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
-10
0
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
1
0
}
m_SizeDelta
:
{
x
:
50
,
y
:
50
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&1153664855
...
...
@@ -802,7 +802,7 @@ MonoBehaviour:
m_EditorClassIdentifier
:
BodySrcManager
:
{
fileID
:
1330895655
}
TrackedJoint
:
11
multiplier
:
1
0
multiplier
:
30
0
---
!u!1
&1190618924
GameObject
:
m_ObjectHideFlags
:
0
...
...
sourcecode/capstone/Assets/Script/DetectJoints.cs
View file @
f32ebe1
...
...
@@ -49,7 +49,7 @@ public class DetectJoints : MonoBehaviour
{
var
pos
=
body
.
Joints
[
TrackedJoint
].
Position
;
//gameObject.transform.position = new Vector3(pos.X*multiplier, pos.Y*multiplier);
gameObject
.
transform
.
position
=
new
Vector3
(
pos
.
X
*
(
multiplier
+
50
),
pos
.
Y
*
multiplier
/
3
,
multiplier
/
2
);
gameObject
.
transform
.
position
=
new
Vector3
(
pos
.
X
*
multiplier
*
2
,
pos
.
Y
*
multiplier
,
multiplier
/
2
);
}
}
...
...
sourcecode/capstone/Assets/Script/Title.cs
View file @
f32ebe1
...
...
@@ -9,14 +9,14 @@ public class Title : MonoBehaviour
{
public
string
SceneToLoad
;
GameObject
quad
;
//커서
GameObject
follow
;
//커서
Vector3
pos
;
private
float
timer
;
private
void
Start
()
{
Debug
.
Log
(
"Start"
);
quad
=
GameObject
.
Find
(
"follow"
).
gameObject
;
follow
=
GameObject
.
Find
(
"follow"
).
gameObject
;
}
public
void
LoadGame
()
...
...
@@ -28,11 +28,11 @@ public class Title : MonoBehaviour
{
Debug
.
Log
(
"Update"
);
pos
=
quad
.
transform
.
position
;
pos
=
follow
.
transform
.
position
;
Debug
.
Log
(
pos
);
if
(
pos
.
x
>=
145
&&
pos
.
x
<=
195
&&
pos
.
y
>=
-
18
&&
pos
.
y
<=
-
1
0
)
{
if
(
pos
.
x
>=
340
&&
pos
.
x
<=
600
&&
pos
.
y
>=
175
&&
pos
.
y
<=
224
&&
pos
.
z
==
15
0
)
{
timer
+=
Time
.
deltaTime
;
Debug
.
Log
(
"Timer: "
+
timer
);
...
...
Please
register
or
login
to post a comment