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-15 21:16:54 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
30fc8209d8993673f86eaf3df5540f201b886e41
30fc8209
1 parent
49b6e03c
운동 횟수 카운트 수정
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
9 deletions
sourcecode/capstone/Assets/Scenes/humanoid.unity
sourcecode/capstone/Assets/Script/Move.cs
sourcecode/capstone/Assets/Scenes/humanoid.unity
View file @
30fc820
...
...
@@ -379,7 +379,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!224
&109009051
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -701,7 +701,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!224
&310358199
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -772,7 +772,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!224
&395084096
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -1293,7 +1293,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!224
&1089006721
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -1736,10 +1736,12 @@ MonoBehaviour:
mirror
:
1
move
:
1
lines
:
[]
lines_right
:
[]
trainer_i
:
-1
trainer_j
:
0
trainer_data1
:
[]
trainer_state
:
speed
:
0
AngleLeftKnee
:
{
fileID
:
1313906998
}
AngleRightKnee
:
{
fileID
:
1543390839
}
KneeToeLeft
:
{
fileID
:
2059169298
}
...
...
@@ -1790,7 +1792,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!224
&1484596776
RectTransform
:
m_ObjectHideFlags
:
0
...
...
sourcecode/capstone/Assets/Script/Move.cs
View file @
30fc820
...
...
@@ -57,7 +57,8 @@ public class Move : MonoBehaviour
string
spinestraight
,
pullhipback
,
great
;
string
exercise
;
int
squat_flag
,
squat_count
;
int
workout_flag
,
workout_count
,
workout_flag2
;
bool
workout
;
private
float
timer
;
public
GameObject
count3
;
...
...
@@ -122,6 +123,13 @@ public class Move : MonoBehaviour
}
//lsy end
void
Trainee_Count
()
{
workout_count
++;
workout
=
false
;
}
void
Start
()
{
timer
=
0
;
...
...
@@ -155,8 +163,10 @@ public class Move : MonoBehaviour
Debug
.
Log
(
"읽음"
);
}
squat_count
=
0
;
squat_flag
=
0
;
workout_count
=
0
;
workout_flag
=
0
;
workout_flag2
=
0
;
workout
=
false
;
HipBalance1
.
SetActive
(
false
);
PullHipBack2
.
SetActive
(
false
);
...
...
@@ -251,6 +261,7 @@ public class Move : MonoBehaviour
Trainer_Run
();
//lsy end
IfSpineIsStraight
.
text
=
"허리를 곧게: Tracking"
;
HipBalance
.
text
=
"양쪽 힙 균형: Calculating"
;
AngleLeftKnee
.
text
=
""
;
...
...
@@ -413,6 +424,17 @@ public class Move : MonoBehaviour
Great5
.
SetActive
(
false
);
}
////////////운동 횟수 카운트//////////////////////
if
(
ReadAngles
[
3
]
<
95
&&
ReadAngles
[
4
]
<
95
&&
workout
&&
workout_flag
>=
95
)
{
Trainee_Count
();
}
else
{
workout_flag
=
ReadAngles
[
3
];
workout_flag2
=
ReadAngles
[
4
];
workout
=
true
;
}
}
else
if
(
exercise
==
"SideHiKick"
)
...
...
@@ -440,12 +462,22 @@ public class Move : MonoBehaviour
else
if
(
ReadAngles
[
8
]
>=
40
)
{
Great5
.
SetActive
(
true
);
//Great
}
else
{
Great5
.
SetActive
(
false
);
}
////////운동 횟수 카운트////////////////////
if
(
ReadAngles
[
7
]
>
40
&&
workout
&&
workout_flag
<=
40
)
{
Trainee_Count
();
}
else
{
workout_flag
=
ReadAngles
[
7
];
workout
=
true
;
}
}
else
if
(
exercise
==
"Lunge"
)
{
...
...
@@ -460,6 +492,28 @@ public class Move : MonoBehaviour
great
=
""
;
Great5
.
SetActive
(
false
);
}
//////////////운동 횟수 카운트//////////////////
//왼쪽
if
(
ReadAngles
[
3
]
<
95
&&
workout
&&
workout_flag
>=
95
)
{
Trainee_Count
();
}
else
{
workout_flag
=
ReadAngles
[
3
];
workout
=
true
;
}
//오른쪽
if
(
ReadAngles
[
4
]
<
95
&&
workout
&&
workout_flag
>=
95
)
{
Trainee_Count
();
}
else
{
workout_flag
=
ReadAngles
[
4
];
workout
=
true
;
}
}
//공통된 사항
...
...
@@ -474,6 +528,8 @@ public class Move : MonoBehaviour
SpineStraight4
.
SetActive
(
false
);
}
IfSpineIsStraight
.
text
=
spinestraight
;
HipBalance
.
text
=
hipbal
;
//AngleLeftKnee.text = "왼쪽 무릎 각도: " + ReadAngles[3].ToString();
...
...
Please
register
or
login
to post a comment