Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions Assets/buttonMasherNeedy.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using System.Collections;
using System;

Expand Down Expand Up @@ -76,4 +76,31 @@ protected void OnTimerExpired()
}
isActive = 0;
}
}

public string TwitchManualCode = "Button Masher";
public string TwitchHelpMessage = "!{0} press 13, !{0} tap 13, !{0} mash 13 (mash the button 13 times)";
public KMSelectable[] ProcessTwitchCommand(string command)
{
command = command.ToLowerInvariant();
if ( !command.StartsWith("press ") &&
!command.StartsWith("tap ") &&
!command.StartsWith("mash ") )
{
return null;
}

command = command.Substring(command.IndexOf(" ") + 1);
int presses;
if (!int.TryParse(command, out presses))
{
return null;
}

KMSelectable[] interacts = new KMSelectable[presses];
for (int i = 0; i < presses; i++)
{
interacts[i] = Solvebutton;
}
return interacts;
}
}