Beispiel #1
0
  public static void AddPickupPlayerDeath(float x,float y, Vector2 vel,Vector2 vel2)
  {
      Pickup pickup = new Pickup();
      pickupAnimation = new Animation();
      pickupAnimation.LoadTexture(pickupTex);
      pickup.Initialize(pickupAnimation, new Vector2(x, y), vel, vel2, 10);
 
      pickups.Add(pickup);
  }
Beispiel #2
0
 public void AddPickup()
 {
     Pickup pickup = new Pickup();
     pickupAnimation = new Animation();
     switch (random.Next(1, 5))
     {
         case 1:
             pickupTex = clockTex;
             break;
         case 2:
             pickupTex = noteTex;
             break;
         case 3:
             pickupTex = coinsTex;
             break;
         case 4:
             pickupTex = piggybankTex;
             break;
     }
     pickupAnimation.LoadTexture(pickupTex);
     pickup.Initialize(pickupAnimation, new Vector2(random.Next(1920), random.Next(1080)), new Vector2(0, 40f),new Vector2 (0,0), 10);
     pickups.Add(pickup);
 }