public void AddButter(DynamicEnvironmentCodex.ObjectTypes en, AmbientFollowInsect xLeader) { AmbientFollowInsect x = Program.game._EntityMaster_AddDynamicEnvironment(en, this.v2StartPos) as AmbientFollowInsect; x.SetFlyBox(new Rectangle(0, 0, 20, 20)); x.Follow(this.xRenderComponent, 8f); x.fMaxSpeed = this.fVelocity * 1.5f; xLeader.AddToFlock(x); this.lxInsectSwarm.Add(x); if (this.v2Direction.X >= 0f) { x.xRenderComponent.SwitchAnimation(4); } else { x.xRenderComponent.SwitchAnimation(5); } if (en == DynamicEnvironmentCodex.ObjectTypes.AmbientFollowInsect_Level3) { x.SetFlyBox(new Rectangle(0, 15, 28, 28)); } }