public override IEnumerator Execute(GameObject target, IAction[] actions, int index) { CharacterShooter charShooter = this.shooter.GetComponent <CharacterShooter>(target); if (charShooter != null) { yield return(charShooter.ChangeWeapon(this.weapon, this.ammo)); } yield return(0); }