private void BlueAttackComplete() { CollectLocationUI collectLocationUI = GetComponent <CollectLocationUI>(); collectLocationUI.enabled = false; collectLocationUI.Reset(); this.uiOverrideFunction(false); }
private IEnumerator DoBlueAttack(CollectLocationUI collectLocationUI) { // give us an extra frame for the substate animation control yield return(null); while (!collectLocationUI.IsLocationSelected()) { yield return(new WaitForSeconds(0.1f)); } this.uiOverrideFunction(false); ActivateCooldown(AttackType.BLUE); // now that we've actually selected a location, change to be uninterruptable this.attackState = AttackState.create(); // start the travel animation now that we've selected. wait a frame. this.anim.SetTrigger("select"); this.immobile = true; this.invulnerable = true; yield return(new WaitForSeconds(2.0f)); transform.position = collectLocationUI.GetLocation(); collectLocationUI.Reset(); yield return(new WaitForSeconds(2.0f)); // exit and give a frame for the transition this.anim.SetTrigger("exitSubState"); yield return(null); this.immobile = false; this.invulnerable = false; this.attackState.finished = true; }