SamplyGame.Enemy.StartShooting C# (CSharp) Method

StartShooting() protected method

protected StartShooting ( ) : void
return void
		protected async void StartShooting()
		{
			while (IsAlive && Node.Components.Count > 0)
			{
				foreach (var weapon in Node.Components.OfType<Weapon>())
				{
					await weapon.FireAsync(false);
					if (!IsAlive)
						return;
				}
				await Node.RunActionsAsync(new DelayTime(RandomHelper.NextRandom(0.1f, 0.5f)));
			}
		}