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 16:45:21 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0e81c8e647e3404cf26143857399fedb3cedcd03
0e81c8e6
1 parent
722594e4
Intro, Start Scene 구현 완료
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
325 additions
and
46 deletions
sourcecode/capstone/Assets/KinectView/Scripts/BodySourceView.cs
sourcecode/capstone/Assets/Scenes/Intro.unity
sourcecode/capstone/Assets/Scenes/Start.unity
sourcecode/capstone/Assets/Scenes/humanoid.unity
sourcecode/capstone/Assets/Script/ClickExercise.cs
sourcecode/capstone/Assets/Script/DetectJoints.cs
sourcecode/capstone/Assets/Script/Move.cs
sourcecode/capstone/Assets/Script/Title.cs
sourcecode/capstone/Assets/KinectView/Scripts/BodySourceView.cs
View file @
0e81c8e
...
...
@@ -24,8 +24,11 @@ public class BodySourceView : MonoBehaviour
public
Text
KneeToeRight
;
public
Text
LeftLegUp
;
public
Text
RightLegUp
;
public
Text
PullHipBak
;
public
Text
Great
;
string
hipbal
,
leftkneewarning
,
rightkneewarning
,
leftsidehighkick
,
rightsidehighkick
;
string
spinestraight
,
pullhipback
,
great
;
private
Dictionary
<
Kinect
.
JointType
,
Kinect
.
JointType
>
_BoneMap
=
new
Dictionary
<
Kinect
.
JointType
,
Kinect
.
JointType
>()
{
...
...
sourcecode/capstone/Assets/Scenes/Intro.unity
View file @
0e81c8e
...
...
@@ -802,7 +802,7 @@ MonoBehaviour:
m_EditorClassIdentifier
:
BodySrcManager
:
{
fileID
:
1330895655
}
TrackedJoint
:
11
multiplier
:
3
00
multiplier
:
4
00
---
!u!1
&1190618924
GameObject
:
m_ObjectHideFlags
:
0
...
...
sourcecode/capstone/Assets/Scenes/Start.unity
View file @
0e81c8e
...
...
@@ -1252,7 +1252,7 @@ MonoBehaviour:
m_EditorClassIdentifier
:
BodySrcManager
:
{
fileID
:
183612550
}
TrackedJoint
:
11
multiplier
:
2
00
multiplier
:
4
00
---
!u!212
&1793793473
SpriteRenderer
:
m_ObjectHideFlags
:
0
...
...
sourcecode/capstone/Assets/Scenes/humanoid.unity
View file @
0e81c8e
...
...
@@ -198,7 +198,7 @@ MonoBehaviour:
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
New Text
m_Text
:
HipBalance
---
!u!1
&72268619
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -374,6 +374,84 @@ Transform:
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&469119554
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
469119555
}
-
component
:
{
fileID
:
469119557
}
-
component
:
{
fileID
:
469119556
}
m_Layer
:
5
m_Name
:
PullHipBack
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!224
&469119555
RectTransform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
469119554
}
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
:
1679758666
}
m_RootOrder
:
8
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
:
0
}
m_SizeDelta
:
{
x
:
160
,
y
:
30
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&469119556
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
469119554
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
5f7201a12d95ffc409449d95f23cf332
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
0.19607843
,
g
:
0.19607843
,
b
:
0.19607843
,
a
:
1
}
m_RaycastTarget
:
1
m_Maskable
:
1
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_FontData
:
m_Font
:
{
fileID
:
10102
,
guid
:
0000000000000000e000000000000000
,
type
:
0
}
m_FontSize
:
14
m_FontStyle
:
0
m_BestFit
:
0
m_MinSize
:
10
m_MaxSize
:
40
m_Alignment
:
0
m_AlignByGeometry
:
0
m_RichText
:
1
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
PullHipBack
---
!u!222
&469119557
CanvasRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
469119554
}
m_CullTransparentMesh
:
0
---
!u!1
&505897242
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -518,7 +596,7 @@ MonoBehaviour:
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
New Text
m_Text
:
---
!u!1
&687225089
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -569,7 +647,7 @@ MonoBehaviour:
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
New Text
m_Text
:
RightLegUp
---
!u!222
&687225091
CanvasRenderer
:
m_ObjectHideFlags
:
0
...
...
@@ -674,7 +752,7 @@ MonoBehaviour:
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
New Tex
t
m_Text
:
IfSpinelsStraigh
t
---
!u!1
&1150688360
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -914,7 +992,7 @@ MonoBehaviour:
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
New Text
m_Text
:
---
!u!1
&1437275810
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -987,7 +1065,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
819eb0cfd2d3e7c439a730d87e92e292
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
BodySourceManager
:
{
fileID
:
0
}
BodySourceManager
:
{
fileID
:
143727581
0
}
Trainnner
:
{
fileID
:
1840191323
}
Trainnne
:
{
fileID
:
1151125687
}
mirror
:
1
...
...
@@ -997,14 +1075,16 @@ MonoBehaviour:
trainer_j
:
0
trainer_data1
:
[]
trainer_state
:
IfSpineIsStraight
:
{
fileID
:
883974736
}
HipBalance
:
{
fileID
:
64300837
}
AngleLeftKnee
:
{
fileID
:
1313906998
}
AngleRightKnee
:
{
fileID
:
1543390839
}
KneeToeLeft
:
{
fileID
:
2059169298
}
KneeToeRight
:
{
fileID
:
618891446
}
LeftLegUp
:
{
fileID
:
1493856869
}
RightLegUp
:
{
fileID
:
687225090
}
IfSpineIsStraight
:
{
fileID
:
883974736
}
HipBalance
:
{
fileID
:
64300837
}
PullHipBack
:
{
fileID
:
469119556
}
Great
:
{
fileID
:
1784424919
}
---
!u!4
&1461362268
Transform
:
m_ObjectHideFlags
:
0
...
...
@@ -1096,7 +1176,7 @@ MonoBehaviour:
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
New Text
m_Text
:
LeftLegUp
---
!u!1
&1543390836
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1131,7 +1211,7 @@ RectTransform:
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
:
0
}
m_AnchoredPosition
:
{
x
:
20
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
160
,
y
:
30
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&1543390838
...
...
@@ -1174,7 +1254,7 @@ MonoBehaviour:
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
New Text
m_Text
:
---
!u!1
&1642118724
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1295,6 +1375,8 @@ RectTransform:
-
{
fileID
:
618891444
}
-
{
fileID
:
1493856867
}
-
{
fileID
:
687225092
}
-
{
fileID
:
469119555
}
-
{
fileID
:
1784424918
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
4
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
...
...
@@ -1363,6 +1445,84 @@ Canvas:
m_SortingLayerID
:
0
m_SortingOrder
:
0
m_TargetDisplay
:
0
---
!u!1
&1784424917
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
1784424918
}
-
component
:
{
fileID
:
1784424920
}
-
component
:
{
fileID
:
1784424919
}
m_Layer
:
5
m_Name
:
Great
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!224
&1784424918
RectTransform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1784424917
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
3
,
y
:
5
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
1679758666
}
m_RootOrder
:
9
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
:
400
,
y
:
160
}
m_SizeDelta
:
{
x
:
160
,
y
:
30
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&1784424919
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1784424917
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
5f7201a12d95ffc409449d95f23cf332
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_RaycastTarget
:
1
m_Maskable
:
1
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_FontData
:
m_Font
:
{
fileID
:
10102
,
guid
:
0000000000000000e000000000000000
,
type
:
0
}
m_FontSize
:
20
m_FontStyle
:
0
m_BestFit
:
0
m_MinSize
:
2
m_MaxSize
:
40
m_Alignment
:
0
m_AlignByGeometry
:
0
m_RichText
:
1
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
Great!
---
!u!222
&1784424920
CanvasRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1784424917
}
m_CullTransparentMesh
:
0
---
!u!1001
&1840191322
PrefabInstance
:
m_ObjectHideFlags
:
0
...
...
@@ -1546,4 +1706,4 @@ MonoBehaviour:
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
New Text
m_Text
:
...
...
sourcecode/capstone/Assets/Script/ClickExercise.cs
View file @
0e81c8e
...
...
@@ -20,9 +20,11 @@ public class ClickExercise : MonoBehaviour
follow
=
GameObject
.
Find
(
"follow"
).
gameObject
;
pos
=
follow
.
transform
.
position
;
Debug
.
Log
(
pos
);
follow
.
transform
.
position
=
new
Vector3
(
400
,
190
,
200
);
//Debug.Log(pos);
}
/*
public void GetBtn()
{
Debug.Log("GetBtn");
...
...
@@ -54,10 +56,12 @@ public class ClickExercise : MonoBehaviour
if (btnImage.name == "Squat")
{
Debug.Log("Squat");
btnImage.texture = Resources.Load("Squat_on", typeof(Texture2D)) as Texture2D;
}
else if (btnImage.name == "Lunge")
{
Debug.Log("Lunge");
btnImage.texture = Resources.Load("Lunge_on", typeof(Texture2D)) as Texture2D;
}
else if (btnImage.name == "SideHiKick")
...
...
@@ -66,23 +70,108 @@ public class ClickExercise : MonoBehaviour
btnImage.texture = Resources.Load("SideHiKick_on", typeof(Texture2D)) as Texture2D;
}
//Squat x:60~285 , y:355~640 , z:300
//SideHighKick x:400 ~ 625, y:355~640, z:300
//Lunge x:735~965 , y:355~640 , z:300
}
*/
void
Update
()
{
pos
=
follow
.
transform
.
position
;
Debug
.
Log
(
pos
);
//
Debug.Log(pos);
/*
if (pos.x >= 155 && pos.x <= 185 && pos.y >= 13 && pos.y <= 60) {
btnImage2.texture = Resources.Load("Squat_off", typeof(Texture2D)) as Texture2D;
btnImage.texture = Resources.Load("SideHiKick_on", typeof(Texture2D)) as Texture2D;
btnImage2.texture = Resources.Load("Lunge_off", typeof(Texture2D)) as Texture2D;
if
(
pos
.
x
>=
60
&&
pos
.
x
<=
285
&&
pos
.
y
>=
335
&&
pos
.
y
<=
640
&&
pos
.
z
==
200
)
{
//스쿼트
timer
+=
Time
.
deltaTime
;
Debug
.
Log
(
"Timer: "
+
timer
);
if
(
timer
>
2.5
)
{
Debug
.
Log
(
"Clicked"
);
//////
GameObject
tempBtn
=
btnParent
.
transform
.
GetChild
(
3
).
gameObject
;
btnImage
=
tempBtn
.
GetComponent
<
RawImage
>();
// 해당 오브젝트의 image 컴포넌트를 받음
if
(
btnImage
.
name
==
"Squat"
)
{
Debug
.
Log
(
"Squat"
);
btnImage
.
texture
=
Resources
.
Load
(
"Squat_on"
,
typeof
(
Texture2D
))
as
Texture2D
;
}
GameObject
sidehk
=
btnParent
.
transform
.
GetChild
(
2
).
gameObject
;
btnImage2
=
sidehk
.
GetComponent
<
RawImage
>();
btnImage2
.
texture
=
Resources
.
Load
(
"SideHiKick_off"
,
typeof
(
Texture2D
))
as
Texture2D
;
GameObject
lunge
=
btnParent
.
transform
.
GetChild
(
1
).
gameObject
;
btnImage2
=
lunge
.
GetComponent
<
RawImage
>();
btnImage2
.
texture
=
Resources
.
Load
(
"Lunge_off"
,
typeof
(
Texture2D
))
as
Texture2D
;
}
}
*/
else
if
(
pos
.
x
>=
400
&&
pos
.
x
<=
625
&&
pos
.
y
>=
335
&&
pos
.
y
<=
640
&&
pos
.
z
==
200
){
//사이드하이킥
timer
+=
Time
.
deltaTime
;
Debug
.
Log
(
"Timer: "
+
timer
);
if
(
timer
>
2.5
)
{
Debug
.
Log
(
"Clicked"
);
/////
GameObject
tempBtn
=
btnParent
.
transform
.
GetChild
(
2
).
gameObject
;
btnImage
=
tempBtn
.
GetComponent
<
RawImage
>();
// 해당 오브젝트의 image 컴포넌트를 받음
if
(
btnImage
.
name
==
"SideHiKick"
)
{
Debug
.
Log
(
"SideHiKick"
);
btnImage
.
texture
=
Resources
.
Load
(
"SideHiKick_on"
,
typeof
(
Texture2D
))
as
Texture2D
;
}
GameObject
squat
=
btnParent
.
transform
.
GetChild
(
3
).
gameObject
;
btnImage2
=
squat
.
GetComponent
<
RawImage
>();
btnImage2
.
texture
=
Resources
.
Load
(
"Squat_off"
,
typeof
(
Texture2D
))
as
Texture2D
;
GameObject
lunge
=
btnParent
.
transform
.
GetChild
(
1
).
gameObject
;
btnImage2
=
lunge
.
GetComponent
<
RawImage
>();
btnImage2
.
texture
=
Resources
.
Load
(
"Lunge_off"
,
typeof
(
Texture2D
))
as
Texture2D
;
}
}
else
if
(
pos
.
x
>=
735
&&
pos
.
x
<=
965
&&
pos
.
y
>=
335
&&
pos
.
y
<=
640
&&
pos
.
z
==
200
)
{
//런지
timer
+=
Time
.
deltaTime
;
Debug
.
Log
(
"Timer: "
+
timer
);
if
(
timer
>
2.5
)
{
Debug
.
Log
(
"Clicked"
);
//////
GameObject
tempBtn
=
btnParent
.
transform
.
GetChild
(
1
).
gameObject
;
btnImage
=
tempBtn
.
GetComponent
<
RawImage
>();
// 해당 오브젝트의 image 컴포넌트를 받음
if
(
btnImage
.
name
==
"Lunge"
)
{
Debug
.
Log
(
"Lunge"
);
btnImage
.
texture
=
Resources
.
Load
(
"Lunge_on"
,
typeof
(
Texture2D
))
as
Texture2D
;
}
GameObject
squat
=
btnParent
.
transform
.
GetChild
(
3
).
gameObject
;
btnImage2
=
squat
.
GetComponent
<
RawImage
>();
btnImage2
.
texture
=
Resources
.
Load
(
"Squat_off"
,
typeof
(
Texture2D
))
as
Texture2D
;
GameObject
sidehk
=
btnParent
.
transform
.
GetChild
(
2
).
gameObject
;
btnImage2
=
sidehk
.
GetComponent
<
RawImage
>();
btnImage2
.
texture
=
Resources
.
Load
(
"SideHiKick_off"
,
typeof
(
Texture2D
))
as
Texture2D
;
}
}
}
}
...
...
sourcecode/capstone/Assets/Script/DetectJoints.cs
View file @
0e81c8e
...
...
@@ -49,7 +49,8 @@ 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
*
2
,
pos
.
Y
*
multiplier
,
multiplier
/
2
);
gameObject
.
transform
.
position
=
new
Vector3
(
pos
.
X
*
multiplier
*
2
,
pos
.
Y
*
multiplier
*
2
,
multiplier
/
2
);
}
}
...
...
sourcecode/capstone/Assets/Script/Move.cs
View file @
0e81c8e
...
...
@@ -38,10 +38,7 @@ public class Move : MonoBehaviour
public
float
[]
trainer_data1
;
public
int
[]
trainer_state
;
//lsy end
public
Text
IfSpineIsStraight
;
public
Text
HipBalance
;
public
Text
AngleLeftKnee
;
public
Text
AngleRightKnee
;
public
Text
KneeToeLeft
;
...
...
@@ -49,7 +46,13 @@ public class Move : MonoBehaviour
public
Text
LeftLegUp
;
public
Text
RightLegUp
;
public
Text
IfSpineIsStraight
;
public
Text
HipBalance
;
public
Text
PullHipBack
;
public
Text
Great
;
string
hipbal
,
leftkneewarning
,
rightkneewarning
,
leftsidehighkick
,
rightsidehighkick
;
string
spinestraight
,
pullhipback
,
great
;
//lsy
void
Trainer_Run
()
...
...
@@ -148,13 +151,16 @@ public class Move : MonoBehaviour
IfSpineIsStraight
.
text
=
"허리를 곧게: Tracking"
;
HipBalance
.
text
=
"양쪽 힙 균형: Calculating"
;
AngleLeftKnee
.
text
=
"
왼쪽 무릎 각도: Tracking
"
;
AngleRightKnee
.
text
=
"
오른쪽 무릎 각도: Tracking
"
;
KneeToeLeft
.
text
=
"
왼쪽 무릎과 발끝: Tracking
"
;
KneeToeRight
.
text
=
"
오른쪽 무릎과 발끝: Tracking
"
;
AngleLeftKnee
.
text
=
""
;
AngleRightKnee
.
text
=
""
;
KneeToeLeft
.
text
=
""
;
KneeToeRight
.
text
=
""
;
LeftLegUp
.
text
=
"왼쪽 다리 들어올린 각도: Tracking"
;
RightLegUp
.
text
=
"오른쪽 다리 들어올린 각도: Tracking"
;
PullHipBack
.
text
=
""
;
Great
.
text
=
""
;
float
[]
data1
=
new
float
[
bodyCount
*
jointCount
*
3
];
int
[]
state
=
new
int
[
bodyCount
*
jointCount
];
int
[]
id
=
new
int
[
bodyCount
];
...
...
@@ -275,16 +281,18 @@ public class Move : MonoBehaviour
if
(
ReadAngles
[
1
]
-
ReadAngles
[
2
]
<=
5
)
{
hipbal
=
"양쪽 균형이 잡혀있습니다."
;
hipbal
=
""
;
//hipbal = "양쪽 균형이 잡혀있습니다.";
}
else
{
hipbal
=
"양쪽 힘이 동일하지 않습니다.
균형을 잡으세요
"
;
hipbal
=
"양쪽 힘이 동일하지 않습니다.
\n균형을 잡으세요!
"
;
}
if
(
ReadAngles
[
5
]
>
90
)
{
leftkneewarning
=
"왼쪽 무릎이 발끝을 넘어갔습니다."
;
//leftkneewarning = "왼쪽 무릎이 발끝을 넘어갔습니다.";
pullhipback
=
"엉덩이를 뒤로 더 빼세요!"
;
}
else
{
...
...
@@ -292,7 +300,8 @@ public class Move : MonoBehaviour
}
if
(
ReadAngles
[
6
]
>
90
)
{
rightkneewarning
=
"오른쪽 무릎이 발끝을 넘어갔습니다."
;
//rightkneewarning = "오른쪽 무릎이 발끝을 넘어갔습니다.";
pullhipback
=
"엉덩이를 뒤로 더 빼세요!"
;
}
else
{
...
...
@@ -317,15 +326,32 @@ public class Move : MonoBehaviour
rightsidehighkick
=
""
;
}
if
(
ReadAngles
[
0
]
<
170
||
ReadAngles
[
0
]
>
190
)
{
spinestraight
=
"허리를 곧게 펴세요!"
;
}
else
{
spinestraight
=
""
;
}
if
(
ReadAngles
[
3
]
<
100
||
ReadAngles
[
4
]
<
100
)
{
great
=
"GREAT!"
;
}
else
{
great
=
""
;
}
IfSpineIsStraight
.
text
=
"허리를 곧게: "
+
ReadAngles
[
0
].
ToString
();
HipBalance
.
text
=
"양쪽 힙 균형: "
+
hipbal
;
AngleLeftKnee
.
text
=
"왼쪽 무릎 각도: "
+
ReadAngles
[
3
].
ToString
();
AngleRightKnee
.
text
=
"오른쪽 무릎 각도: "
+
ReadAngles
[
4
].
ToString
();
KneeToeLeft
.
text
=
"올바르지 않은 자세: "
+
leftkneewarning
;
KneeToeRight
.
text
=
"올바르지 않은 자세: "
+
rightkneewarning
;
LeftLegUp
.
text
=
"왼쪽 다리 운동중: "
+
leftsidehighkick
;
RightLegUp
.
text
=
"오른쪽 다리 운동중: "
+
rightsidehighkick
;
IfSpineIsStraight
.
text
=
spinestraight
;
HipBalance
.
text
=
hipbal
;
//AngleLeftKnee.text = "왼쪽 무릎 각도: " + ReadAngles[3].ToString();
//AngleRightKnee.text = "오른쪽 무릎 각도: " + ReadAngles[4].ToString();
//KneeToeLeft.text = "올바르지 않은 자세: " + leftkneewarning;
//KneeToeRight.text = "올바르지 않은 자세: " + rightkneewarning;
PullHipBack
.
text
=
pullhipback
;
LeftLegUp
.
text
=
leftsidehighkick
;
RightLegUp
.
text
=
rightsidehighkick
;
Great
.
text
=
great
;
///////////////////////////
...
...
sourcecode/capstone/Assets/Script/Title.cs
View file @
0e81c8e
...
...
@@ -32,11 +32,11 @@ public class Title : MonoBehaviour
Debug
.
Log
(
pos
);
if
(
pos
.
x
>=
3
40
&&
pos
.
x
<=
600
&&
pos
.
y
>=
175
&&
pos
.
y
<=
224
&&
pos
.
z
==
15
0
)
{
if
(
pos
.
x
>=
3
60
&&
pos
.
x
<=
600
&&
pos
.
y
>=
180
&&
pos
.
y
<=
200
&&
pos
.
z
==
20
0
)
{
timer
+=
Time
.
deltaTime
;
Debug
.
Log
(
"Timer: "
+
timer
);
if
(
timer
>
2
)
{
if
(
timer
>
2
.5
)
{
Debug
.
Log
(
"Clicked"
);
SceneManager
.
LoadScene
(
SceneToLoad
);
}
...
...
Please
register
or
login
to post a comment