// Update is called once per frame
void Update()
{
//http://docs.unity3d.com/ScriptReference/Input-inputString.html
#region act&jump input
if (Input.GetKey(KeyCode.LeftShift))
{
isRun = true;
}
if (Input.anyKeyDown)
{// print(Input.inputString);
foreach (char c in Input.inputString)
{
if (c != null)
{
inputArgs.input = c.ToString();// Input.inputString;
Input_events(inputArgs);
}
}
}
#endregion
#region move input
if (Input.GetKey(KeyCode.S))
{
inputArgs.input = "s";
inputArgs.input = Input.inputString;
Input_events(inputArgs);
heroStateMoveVer.UpDate("down", isRun);
}
if (Input.GetKey(KeyCode.A))
{
inputArgs.input = "a";
inputArgs.input = Input.inputString;
Input_events(inputArgs);
heroStateMoveVer.UpDate("left", isRun);
}
else if (Input.GetKey(KeyCode.D))
{
inputArgs.input = "d";
inputArgs.input = Input.inputString;
Input_events(inputArgs);
heroStateMoveVer.UpDate("right", isRun);
}
isRun = false;
#endregion
heroStateActVer.UpDate();//
}