IEnumerator Punch(AIInputGenerator ai) { attacking = true; ai.TapButton("Attack"); yield return(new WaitForSeconds(attackDelay)); attacking = false; }
public override void BehaviourFixedUpdate(Boss boss) { AIInputGenerator ai = (AIInputGenerator)boss.InputGenerator; ai.Reset(); if (boss.State is GroundedPlayerState) { ai.SetAxis("Horizontal", -1.0f); } }
public override void BehaviourFixedUpdate(Boss boss) { if (EntityFactory.Instance.GetPlayer().Inventory.NumWads > 0) { AIInputGenerator ai = (AIInputGenerator)boss.InputGenerator; ai.Reset(); if (!attacking) { boss.StartCoroutine(Punch(ai)); } } else if (!finishing) { boss.StartCoroutine(Finish(boss)); } }
public override void Start() { inputGenerator = new AIInputGenerator("AI"); InputBuffer.Instance.AddInputGenerator(inputGenerator); }