示例#1
0
 private void SpawnSparkles(PickedUpArgs e)
 {
     for (int i = 0; i < 2; i++)
     {
         float randY = (float)(TMBAW_Game.Random.Next(-1, 0) * TMBAW_Game.Random.NextDouble());
         float randX = (float)(TMBAW_Game.Random.Next(-1, 2) * TMBAW_Game.Random.NextDouble());
         ParticleSystem.Add(ParticleType.Tiny, CalcHelper.GetRandXAndY(CollRectangle), new Vector2(randX, randY), Color.Yellow);
     }
 }
示例#2
0
 private void Food_OnPlayerPickUp(PickedUpArgs e)
 {
     e.Player.Heal(_healAmount);
     _pickUpSound.Play();
 }