Exemple #1
0
 public override void UpdateWhenCurrentLocation(GameTime time)
 {
     base.UpdateWhenCurrentLocation(time);
     bananaShrineEvent.Poll();
     if (_parrots != null)
     {
         _parrots.Update(time);
     }
     if (bananaShrineComplete.Value && Game1.random.NextDouble() < 0.005)
     {
         TemporaryAnimatedSprite t = getTemporarySpriteByID(888);
         if (t != null && t.motion.Equals(Vector2.Zero))
         {
             temporarySprites.Add(new TemporaryAnimatedSprite("TileSheets\\critters", new Microsoft.Xna.Framework.Rectangle(128, 352, 32, 32), 200 + ((Game1.random.NextDouble() < 0.1) ? Game1.random.Next(1000, 3000) : 0), 1, 1, t.position, flicker: false, flipped: false, 0.12224f, 0f, Color.White, 4f, 0f, 0f, 0f));
         }
     }
 }
 public override void UpdateWhenCurrentLocation(GameTime time)
 {
     base.UpdateWhenCurrentLocation(time);
     if (isPirateNight())
     {
         if (Game1.currentLocation == this && !wasPirateCaveOnLoad && Game1.locationRequest == null && Game1.activeClickableMenu == null && Game1.currentMinigame == null && Game1.CurrentEvent == null)
         {
             Game1.player.completelyStopAnimatingOrDoingAction();
             Game1.warpFarmer("IslandSouthEast", 29, 19, 1);
         }
         if (_parrots != null)
         {
             _parrots.Update(time);
         }
         smokeTimer -= (float)time.ElapsedGameTime.TotalMilliseconds;
         if (smokeTimer <= 0f)
         {
             Utility.addSmokePuff(this, new Vector2(25.6f, 5.7f) * 64f);
             Utility.addSmokePuff(this, new Vector2(34f, 7.2f) * 64f);
             smokeTimer = 1000f;
         }
     }
 }