상속: SamplyGame.Weapon
예제 #1
0
파일: SamplyGame.cs 프로젝트: elix22/urho
        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();
            }
        }
예제 #2
0
		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();
			}
		}