Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
ButtonPusher
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
Button Pusher
ButtonPusher
Commits
ecd89d5d
Commit
ecd89d5d
authored
7 years ago
by
16이상민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring about motion notes. Add motion: JumpPushUp.
parent
6cfca48c
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
0 additions
and
184 deletions
+0
-184
Clap.cs
Assets/MotionNotes/Clap.cs
+0
-12
Guard.cs
Assets/MotionNotes/Guard.cs
+0
-32
HandDown.cs
Assets/MotionNotes/HandDown.cs
+0
-22
HandUp.cs
Assets/MotionNotes/HandUp.cs
+0
-22
Headphone.cs
Assets/MotionNotes/Headphone.cs
+0
-22
Jesus.cs
Assets/MotionNotes/Jesus.cs
+0
-11
Jump.cs
Assets/MotionNotes/Jump.cs
+0
-12
OnTheTable.cs
Assets/MotionNotes/OnTheTable.cs
+0
-11
PushUp.cs
Assets/MotionNotes/PushUp.cs
+0
-35
MotionNote.cs
Assets/Script/MotionNote.cs
+0
-5
No files found.
Assets/MotionNotes/Clap.cs
View file @
ecd89d5d
...
@@ -20,16 +20,4 @@ public class Clap : MotionNote
...
@@ -20,16 +20,4 @@ public class Clap : MotionNote
public
Clap
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
public
Clap
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
{
{
}
}
public
override
void
Checkpoint
()
{
IsChecked
=
(
InputManager
.
Instance
.
CurrentMotionState
&
MotionState
.
CLAP_PREPARE
)
!=
0
;
}
public
override
bool
FinalJudgeAction
()
{
return
(
InputManager
.
Instance
.
CurrentMotionState
&
MotionState
.
CLAP_DONE
)
!=
0
;
}
}
}
This diff is collapsed.
Click to expand it.
Assets/MotionNotes/Guard.cs
View file @
ecd89d5d
...
@@ -4,11 +4,6 @@ using UnityEngine;
...
@@ -4,11 +4,6 @@ using UnityEngine;
public
class
Guard
:
MotionNote
public
class
Guard
:
MotionNote
{
{
enum
Hand
{
Both
,
Left
,
Right
}
Hand
hand
;
MotionState
prepare
,
done
;
private
static
Sprite
image
;
private
static
Sprite
image
;
public
override
Sprite
Image
public
override
Sprite
Image
{
{
...
@@ -23,30 +18,15 @@ public class Guard : MotionNote
...
@@ -23,30 +18,15 @@ public class Guard : MotionNote
switch
(
key
)
switch
(
key
)
{
{
case
"BG"
:
case
"BG"
:
hand
=
Hand
.
Both
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/BG.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/BG.png"
);
prepare
=
MotionState
.
GUARD_BASE_LEFT
|
MotionState
.
GUARD_BASE_RIGHT
|
MotionState
.
HAND_MOVE_DOWN_LEFT
|
MotionState
.
HAND_MOVE_DOWN_RIGHT
;
done
=
MotionState
.
GUARD_BASE_LEFT
|
MotionState
.
GUARD_BASE_RIGHT
|
MotionState
.
HAND_MOVE_UP_LEFT
|
MotionState
.
HAND_MOVE_UP_RIGHT
;
MotionName
=
"GuardBoth"
;
MotionName
=
"GuardBoth"
;
break
;
break
;
case
"LG"
:
case
"LG"
:
hand
=
Hand
.
Left
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/LG.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/LG.png"
);
prepare
=
MotionState
.
GUARD_BASE_LEFT
|
MotionState
.
HAND_MOVE_DOWN_LEFT
;
done
=
MotionState
.
GUARD_BASE_LEFT
|
MotionState
.
HAND_MOVE_UP_LEFT
;
MotionName
=
"GuardLeft"
;
MotionName
=
"GuardLeft"
;
break
;
break
;
case
"RG"
:
case
"RG"
:
hand
=
Hand
.
Right
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/RG.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/RG.png"
);
prepare
=
MotionState
.
GUARD_BASE_RIGHT
|
MotionState
.
HAND_MOVE_DOWN_RIGHT
;
done
=
MotionState
.
GUARD_BASE_RIGHT
|
MotionState
.
HAND_MOVE_UP_RIGHT
;
MotionName
=
"GuardRight"
;
MotionName
=
"GuardRight"
;
break
;
break
;
}
}
...
@@ -54,16 +34,4 @@ public class Guard : MotionNote
...
@@ -54,16 +34,4 @@ public class Guard : MotionNote
public
Guard
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
public
Guard
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
{
{
}
}
public
override
void
Checkpoint
()
{
IsChecked
=
(
InputManager
.
Instance
.
CurrentMotionState
&
prepare
)
!=
0
;
}
public
override
bool
FinalJudgeAction
()
{
return
(
InputManager
.
Instance
.
CurrentMotionState
&
done
)
!=
0
;
}
}
}
This diff is collapsed.
Click to expand it.
Assets/MotionNotes/HandDown.cs
View file @
ecd89d5d
...
@@ -4,11 +4,6 @@ using UnityEngine;
...
@@ -4,11 +4,6 @@ using UnityEngine;
public
class
HandDown
:
MotionNote
public
class
HandDown
:
MotionNote
{
{
enum
Hand
{
Both
,
Left
,
Right
}
Hand
hand
;
MotionState
done
;
private
static
Sprite
image
;
private
static
Sprite
image
;
public
override
Sprite
Image
public
override
Sprite
Image
{
{
...
@@ -23,21 +18,15 @@ public class HandDown : MotionNote
...
@@ -23,21 +18,15 @@ public class HandDown : MotionNote
switch
(
key
)
switch
(
key
)
{
{
case
"BD"
:
case
"BD"
:
hand
=
Hand
.
Both
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/BD.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/BD.png"
);
done
=
MotionState
.
HAND_DOWN_LEFT
|
MotionState
.
HAND_DOWN_RIGHT
;
MotionName
=
"HandDownBoth"
;
MotionName
=
"HandDownBoth"
;
break
;
break
;
case
"LD"
:
case
"LD"
:
hand
=
Hand
.
Left
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/LD.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/LD.png"
);
done
=
MotionState
.
HAND_DOWN_LEFT
;
MotionName
=
"HandDownLeft"
;
MotionName
=
"HandDownLeft"
;
break
;
break
;
case
"RD"
:
case
"RD"
:
hand
=
Hand
.
Right
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/RD.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/RD.png"
);
done
=
MotionState
.
HAND_DOWN_RIGHT
;
MotionName
=
"HandDownRight"
;
MotionName
=
"HandDownRight"
;
break
;
break
;
}
}
...
@@ -45,15 +34,4 @@ public class HandDown : MotionNote
...
@@ -45,15 +34,4 @@ public class HandDown : MotionNote
public
HandDown
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
public
HandDown
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
{
{
}
}
public
override
void
Checkpoint
()
{
IsChecked
=
true
;
}
public
override
bool
FinalJudgeAction
()
{
return
(
InputManager
.
Instance
.
CurrentMotionState
&
done
)
!=
0
;
}
}
}
This diff is collapsed.
Click to expand it.
Assets/MotionNotes/HandUp.cs
View file @
ecd89d5d
...
@@ -4,11 +4,6 @@ using UnityEngine;
...
@@ -4,11 +4,6 @@ using UnityEngine;
public
class
HandUp
:
MotionNote
public
class
HandUp
:
MotionNote
{
{
enum
Hand
{
Both
,
Left
,
Right
}
Hand
hand
;
MotionState
done
;
private
static
Sprite
image
;
private
static
Sprite
image
;
public
override
Sprite
Image
public
override
Sprite
Image
{
{
...
@@ -23,21 +18,15 @@ public class HandUp : MotionNote
...
@@ -23,21 +18,15 @@ public class HandUp : MotionNote
switch
(
key
)
switch
(
key
)
{
{
case
"BU"
:
case
"BU"
:
hand
=
Hand
.
Both
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/BU.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/BU.png"
);
done
=
MotionState
.
HAND_UP_LEFT
|
MotionState
.
HAND_UP_RIGHT
;
MotionName
=
"HandUpBoth"
;
MotionName
=
"HandUpBoth"
;
break
;
break
;
case
"LU"
:
case
"LU"
:
hand
=
Hand
.
Left
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/LU.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/LU.png"
);
done
=
MotionState
.
HAND_UP_LEFT
;
MotionName
=
"HandUpLeft"
;
MotionName
=
"HandUpLeft"
;
break
;
break
;
case
"RU"
:
case
"RU"
:
hand
=
Hand
.
Right
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/RU.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/RU.png"
);
done
=
MotionState
.
HAND_UP_RIGHT
;
MotionName
=
"HandUpRight"
;
MotionName
=
"HandUpRight"
;
break
;
break
;
}
}
...
@@ -45,15 +34,4 @@ public class HandUp : MotionNote
...
@@ -45,15 +34,4 @@ public class HandUp : MotionNote
public
HandUp
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
public
HandUp
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
{
{
}
}
public
override
void
Checkpoint
()
{
IsChecked
=
true
;
}
public
override
bool
FinalJudgeAction
()
{
return
(
InputManager
.
Instance
.
CurrentMotionState
&
done
)
!=
0
;
}
}
}
This diff is collapsed.
Click to expand it.
Assets/MotionNotes/Headphone.cs
View file @
ecd89d5d
...
@@ -4,11 +4,6 @@ using UnityEngine;
...
@@ -4,11 +4,6 @@ using UnityEngine;
public
class
Headphone
:
MotionNote
public
class
Headphone
:
MotionNote
{
{
enum
Hand
{
Both
,
Left
,
Right
}
Hand
hand
;
MotionState
done
;
private
static
Sprite
image
;
private
static
Sprite
image
;
public
override
Sprite
Image
public
override
Sprite
Image
{
{
...
@@ -23,36 +18,19 @@ public class Headphone : MotionNote
...
@@ -23,36 +18,19 @@ public class Headphone : MotionNote
switch
(
key
)
switch
(
key
)
{
{
case
"BH"
:
case
"BH"
:
hand
=
Hand
.
Both
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/BH.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/BH.png"
);
done
=
MotionState
.
HEADPHONE_LEFT
|
MotionState
.
HEADPHONE_RIGHT
;
MotionName
=
"HeadphoneBoth"
;
MotionName
=
"HeadphoneBoth"
;
break
;
break
;
case
"LH"
:
case
"LH"
:
hand
=
Hand
.
Left
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/LH.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/LH.png"
);
done
=
MotionState
.
HEADPHONE_LEFT
;
MotionName
=
"HeadphoneLeft"
;
MotionName
=
"HeadphoneLeft"
;
break
;
break
;
case
"RH"
:
case
"RH"
:
hand
=
Hand
.
Right
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/RH.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/RH.png"
);
done
=
MotionState
.
HEADPHONE_RIGHT
;
MotionName
=
"HeadphoneRight"
;
MotionName
=
"HeadphoneRight"
;
break
;
break
;
}
}
}
}
public
Headphone
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
public
Headphone
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
{
}
{
}
public
override
void
Checkpoint
()
{
IsChecked
=
true
;
}
public
override
bool
FinalJudgeAction
()
{
return
(
InputManager
.
Instance
.
CurrentMotionState
&
done
)
!=
0
;
}
}
}
This diff is collapsed.
Click to expand it.
Assets/MotionNotes/Jesus.cs
View file @
ecd89d5d
...
@@ -20,15 +20,4 @@ public class Jesus : MotionNote
...
@@ -20,15 +20,4 @@ public class Jesus : MotionNote
public
Jesus
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
public
Jesus
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
{
{
}
}
public
override
void
Checkpoint
()
{
IsChecked
=
true
;
}
public
override
bool
FinalJudgeAction
()
{
return
(
InputManager
.
Instance
.
CurrentMotionState
&
MotionState
.
JESUS
)
!=
0
;
}
}
}
This diff is collapsed.
Click to expand it.
Assets/MotionNotes/Jump.cs
View file @
ecd89d5d
...
@@ -20,16 +20,4 @@ public class Jump : MotionNote
...
@@ -20,16 +20,4 @@ public class Jump : MotionNote
public
Jump
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
public
Jump
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
{
{
}
}
public
override
void
Checkpoint
()
{
IsChecked
=
(
InputManager
.
Instance
.
CurrentMotionState
&
MotionState
.
JUMP_PREPARE
)
!=
0
;
}
public
override
bool
FinalJudgeAction
()
{
return
(
InputManager
.
Instance
.
CurrentMotionState
&
MotionState
.
JUMP_DONE
)
!=
0
;
}
}
}
This diff is collapsed.
Click to expand it.
Assets/MotionNotes/OnTheTable.cs
View file @
ecd89d5d
...
@@ -20,15 +20,4 @@ public class OnTheTable : MotionNote
...
@@ -20,15 +20,4 @@ public class OnTheTable : MotionNote
public
OnTheTable
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
public
OnTheTable
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
{
{
}
}
public
override
void
Checkpoint
()
{
IsChecked
=
true
;
}
public
override
bool
FinalJudgeAction
()
{
return
(
InputManager
.
Instance
.
CurrentMotionState
&
MotionState
.
ON_THE_TABLE
)
!=
0
;
}
}
}
This diff is collapsed.
Click to expand it.
Assets/MotionNotes/PushUp.cs
View file @
ecd89d5d
...
@@ -4,11 +4,6 @@ using UnityEngine;
...
@@ -4,11 +4,6 @@ using UnityEngine;
public
class
PushUp
:
MotionNote
public
class
PushUp
:
MotionNote
{
{
enum
Hand
{
Both
,
Left
,
Right
}
Hand
hand
;
MotionState
prepare
,
done
;
private
static
Sprite
image
;
private
static
Sprite
image
;
public
override
Sprite
Image
public
override
Sprite
Image
{
{
...
@@ -23,45 +18,27 @@ public class PushUp : MotionNote
...
@@ -23,45 +18,27 @@ public class PushUp : MotionNote
switch
(
key
)
switch
(
key
)
{
{
case
"BP"
:
case
"BP"
:
hand
=
Hand
.
Both
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/BP.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/BP.png"
);
prepare
=
MotionState
.
HAND_MOVE_UP_LEFT
|
MotionState
.
HAND_MOVE_UP_RIGHT
;
done
=
MotionState
.
HAND_MOVE_DOWN_LEFT
|
MotionState
.
HAND_MOVE_DOWN_RIGHT
;
MotionName
=
"PushUpBoth"
;
MotionName
=
"PushUpBoth"
;
break
;
break
;
case
"LP"
:
case
"LP"
:
hand
=
Hand
.
Left
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/LP.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/LP.png"
);
prepare
=
MotionState
.
HAND_MOVE_UP_LEFT
;
done
=
MotionState
.
HAND_MOVE_DOWN_LEFT
;
MotionName
=
"PushUpLeft"
;
MotionName
=
"PushUpLeft"
;
break
;
break
;
case
"RP"
:
case
"RP"
:
hand
=
Hand
.
Right
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/RP.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/RP.png"
);
prepare
=
MotionState
.
HAND_MOVE_UP_RIGHT
;
done
=
MotionState
.
HAND_MOVE_DOWN_RIGHT
;
MotionName
=
"PushUpRight"
;
MotionName
=
"PushUpRight"
;
break
;
break
;
case
"BK"
:
case
"BK"
:
hand
=
Hand
.
Both
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/BK.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/BK.png"
);
prepare
=
MotionState
.
HAND_MOVE_UP_LEFT
|
MotionState
.
HAND_MOVE_UP_RIGHT
|
MotionState
.
JUMP_PREPARE
;
done
=
MotionState
.
HAND_MOVE_DOWN_LEFT
|
MotionState
.
HAND_MOVE_DOWN_RIGHT
|
MotionState
.
JUMP_DONE
;
MotionName
=
"JumpPushUpBoth"
;
MotionName
=
"JumpPushUpBoth"
;
break
;
break
;
case
"LK"
:
case
"LK"
:
hand
=
Hand
.
Left
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/LK.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/LK.png"
);
prepare
=
MotionState
.
HAND_MOVE_UP_LEFT
|
MotionState
.
JUMP_PREPARE
;
done
=
MotionState
.
HAND_MOVE_DOWN_LEFT
|
MotionState
.
JUMP_DONE
;
MotionName
=
"JumpPushUpLeft"
;
MotionName
=
"JumpPushUpLeft"
;
break
;
break
;
case
"RK"
:
case
"RK"
:
hand
=
Hand
.
Right
;
image
=
LoadNewSprite
(
"Assets/MotionNotes/RK.png"
);
image
=
LoadNewSprite
(
"Assets/MotionNotes/RK.png"
);
prepare
=
MotionState
.
HAND_MOVE_UP_RIGHT
|
MotionState
.
JUMP_PREPARE
;
done
=
MotionState
.
HAND_MOVE_DOWN_RIGHT
|
MotionState
.
JUMP_DONE
;
MotionName
=
"JumpPushUpRight"
;
MotionName
=
"JumpPushUpRight"
;
break
;
break
;
}
}
...
@@ -69,16 +46,4 @@ public class PushUp : MotionNote
...
@@ -69,16 +46,4 @@ public class PushUp : MotionNote
public
PushUp
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
public
PushUp
(
float
start
,
float
end
=
0f
)
:
base
(
start
,
end
)
{
{
}
}
public
override
void
Checkpoint
()
{
IsChecked
=
(
InputManager
.
Instance
.
CurrentMotionState
&
prepare
)
!=
0
;
}
public
override
bool
FinalJudgeAction
()
{
return
(
InputManager
.
Instance
.
CurrentMotionState
&
done
)
!=
0
;
}
}
}
This diff is collapsed.
Click to expand it.
Assets/Script/MotionNote.cs
View file @
ecd89d5d
...
@@ -13,11 +13,6 @@ public abstract class MotionNote : Note
...
@@ -13,11 +13,6 @@ public abstract class MotionNote : Note
public
MotionNote
(
string
key
,
float
start
,
float
end
=
0f
)
public
MotionNote
(
string
key
,
float
start
,
float
end
=
0f
)
:
this
(
start
,
end
)
{
}
:
this
(
start
,
end
)
{
}
public
abstract
void
Checkpoint
();
public
abstract
bool
FinalJudgeAction
();
public
bool
IsChecked
{
get
;
protected
set
;
}
public
MotionSampleDisplay
MotionSampleDisplay
{
get
;
set
;
}
public
MotionSampleDisplay
MotionSampleDisplay
{
get
;
set
;
}
public
string
MotionName
{
get
;
protected
set
;
}
public
string
MotionName
{
get
;
protected
set
;
}
...
...
This diff is collapsed.
Click to expand it.
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