some refactorings and code organizing#4
Open
ninjamuffin99 wants to merge 4 commits into
Open
Conversation
note: this very well could just be zero as well and have no effect
and split into backends
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Haptic.hxHaptic.vibrate()call in a#if mobileconditional. In there are just empty functions so it does nothing.HapticIOS.hxandHapticAndroid.hxhave now become our "platform specific" functions. Things likevibratePatternFromData()to load (currently) apple specific .ahap files, are inHapticIOS.hxandisPrimitiveSupported()is now inHapticAndroid.hxas it's Android specific functionality.Haptic.hxnow has no platform specific code inside of it, it's merely a facade which calls our backends.These changes should allow easier organization
Lil other misc changes
CHHapticTimeImmediatewhich could have no effect at all and just be value 0. But I saw it in some of the Apple sample code so I figured we can use it as our constant here.I have only tested on iOS, but core functionality should generally be the same. All the previous developer facing function calls should work the exact same way (
Haptic.vibrateOneshot()should vibrate the same way as previous).I have android phone on me for further testing of this, but if u have notes lemme know @MAJigsaw77