async void SpawnCoins() { var player = Player; while (Player.IsAlive && player == Player) { var coinNode = scene.CreateChild(); coinNode.Position = new Vector3(RandomHelper.NextRandom(-2.5f, 2.5f), 5f, 0); var coin = new Apple(); coinNode.AddComponent(coin); await coin.FireAsync(false); await scene.RunActionsAsync(new DelayTime(3f)); coinNode.Remove(); } }