void Update() { // TODO: how to handle multiple inputs on one frame? Right now we get // whichever comes last in map. foreach (string b in attackMap.Keys) { bool has_fired = Input.GetButton(b); if (has_fired) { Debug.Log(string.Format("Input {0}: {1}", b, has_fired), this); Attacking.eAttackDirection dir = attackMap[b]; attackController.QueueAttack(dir); } } }
void InitiateAttack() { attackController.QueueAttack(SelectAttack()); }