public static void CleanPickup(LastWishPickup lastWish = null) { Pickup[] pickups = player.GetComponentsInChildren<Pickup>(); foreach( Pickup pickup in pickups ) { if( pickup != lastWish || lastWish.IsLaunched() ) { pickup.Disable(); } } if( lastWish != null && lastWish.IsLaunched() ) { lastWish.Cancel(); } }
public void SetLastWish( LastWishPickup value ) { if( value ) { lastWish = value; } else { lastWish = null; } }