Skip to content

Commit

Permalink
Add Dash2
Browse files Browse the repository at this point in the history
  • Loading branch information
ShootMe committed Mar 30, 2018
1 parent c2d077a commit bfb4abe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions Game/InputController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ private void SetInputs() {
(Current.HasActions(Actions.Jump) ? Buttons.A : (Buttons)0)
| (Current.HasActions(Actions.Jump2) ? Buttons.Y : (Buttons)0)
| (Current.HasActions(Actions.Dash) ? Buttons.B : (Buttons)0)
| (Current.HasActions(Actions.Dash2) ? Buttons.X : (Buttons)0)
| (Current.HasActions(Actions.Grab) ? Buttons.RightShoulder : (Buttons)0)
| (Current.HasActions(Actions.Start) ? Buttons.Start : (Buttons)0)
| (Current.HasActions(Actions.Restart) ? Buttons.LeftShoulder : (Buttons)0)
Expand Down
5 changes: 4 additions & 1 deletion Game/InputRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public enum Actions {
Restart = 256,
Feather = 512,
Journal = 1024,
Jump2 = 2048
Jump2 = 2048,
Dash2 = 4096
}
public class InputRecord {
public int Line { get; set; }
Expand Down Expand Up @@ -53,6 +54,7 @@ public InputRecord(int number, string line) {
case 'Q': Actions ^= Actions.Restart; break;
case 'N': Actions ^= Actions.Journal; break;
case 'K': Actions ^= Actions.Jump2; break;
case 'C': Actions ^= Actions.Dash2; break;
case 'F':
Actions ^= Actions.Feather;
index++;
Expand Down Expand Up @@ -171,6 +173,7 @@ public string ActionsToString() {
if (HasActions(Actions.Jump)) { sb.Append(",J"); }
if (HasActions(Actions.Jump2)) { sb.Append(",K"); }
if (HasActions(Actions.Dash)) { sb.Append(",X"); }
if (HasActions(Actions.Dash2)) { sb.Append(",C"); }
if (HasActions(Actions.Grab)) { sb.Append(",G"); }
if (HasActions(Actions.Start)) { sb.Append(",S"); }
if (HasActions(Actions.Restart)) { sb.Append(",Q"); }
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ ie) 123,R,J (For 123 frames, hold Right and Jump)
- U = Up
- D = Down
- J = Jump
- K = Jump Bind 2
- X = Dash
- C = Dash Bind 2
- G = Grab
- S = Start
- Q = Quick Reset
Expand Down
5 changes: 4 additions & 1 deletion Tools/Entities/InputRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public enum Actions {
Restart = 256,
Feather = 512,
Journal = 1024,
Jump2 = 2048
Jump2 = 2048,
Dash2 = 4096
}
public class InputRecord {
public static char Delimiter = ',';
Expand Down Expand Up @@ -59,6 +60,7 @@ public InputRecord(string line) {
case 'Q': Actions ^= Actions.Restart; break;
case 'N': Actions ^= Actions.Journal; break;
case 'K': Actions ^= Actions.Jump2; break;
case 'C': Actions ^= Actions.Dash2; break;
case 'F':
Actions ^= Actions.Feather;
index++;
Expand Down Expand Up @@ -179,6 +181,7 @@ public string ActionsToString() {
if (HasActions(Actions.Jump)) { sb.Append(Delimiter).Append('J'); }
if (HasActions(Actions.Jump2)) { sb.Append(Delimiter).Append('K'); }
if (HasActions(Actions.Dash)) { sb.Append(Delimiter).Append('X'); }
if (HasActions(Actions.Dash2)) { sb.Append(Delimiter).Append('C'); }
if (HasActions(Actions.Grab)) { sb.Append(Delimiter).Append('G'); }
if (HasActions(Actions.Start)) { sb.Append(Delimiter).Append('S'); }
if (HasActions(Actions.Restart)) { sb.Append(Delimiter).Append('Q'); }
Expand Down

0 comments on commit bfb4abe

Please sign in to comment.