internal override void HandleNewLocation(Farmer who, GameLocation location) { // Ensure we can force a critter to appear if (location.critters is null) { location.critters = new List <Critter>(); } if (_fireflies.Count == 0) { // Spawn firefly for (int x = 0; x < Game1.random.Next(3); x++) { FireflyFollower firefly = new FireflyFollower(who.getTileLocation()); _fireflies.Add(firefly); location.critters.Add(firefly); } } foreach (var firefly in _fireflies) { firefly.resetForNewLocation(who.getTileLocation()); location.critters.Add(firefly); } }
internal override void HandleEquip(Farmer who, GameLocation location) { // Ensure we can force a critter to appear if (location.critters is null) { location.critters = new List <Critter>(); } // Spawn firefly for (int x = 0; x < Game1.random.Next(1, 4); x++) { FireflyFollower firefly = new FireflyFollower(who.getTileLocation()); _fireflies.Add(firefly); location.critters.Add(firefly); } }