Skip to content

Commit

Permalink
Add SpeedSetter functions to holdables
Browse files Browse the repository at this point in the history
This allows holdables to be affected by entities that use SpeedSetter (e.g. Frost Helper custom springs)
  • Loading branch information
bigkahuna443 committed Sep 12, 2024
1 parent fc7e7d0 commit 4171ec5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Code/FLCC/CustomPuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public CustomPuffer(EntityData data, Vector2 offset, EntityID id)
Hold.OnPickup = OnPickup;
Hold.OnRelease = OnRelease;
Hold.SpeedGetter = (() => hitSpeed);
Hold.SpeedSetter = (speed) => hitSpeed = speed;
Add(new TransitionListener
{
OnOut = (f) => needsNewHome = true
Expand Down
1 change: 1 addition & 0 deletions Code/FLCC/FlagCrystal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public FlagCrystal(EntityData data, Vector2 offset, EntityID id) : base(data.Pos
Hold.OnHitSpring = new Func<Spring, bool>(HitSpring);
Hold.OnHitSpinner = new Action<Entity>(HitSpinner);
Hold.SpeedGetter = () => Speed;
Hold.SpeedSetter = (speed) => Speed = speed;
onCollideH = new Collision(OnCollideH);
onCollideV = new Collision(OnCollideV);
LiftSpeedGraceTime = 0.1f;
Expand Down

0 comments on commit 4171ec5

Please sign in to comment.