FNF-CNE-Devs / CodenameEngine

awesome fnf engine :D
Apache License 2.0
248 stars 166 forks source link

OpenFL version compatibility fix (reopen) #250

Closed Jamextreme140 closed 6 months ago

Jamextreme140 commented 6 months ago

(reopen of #249 with a new solution)

Uses (compiles) "source" or "audioSource" variable depending of the OpenFL version, in order to not break FlxSound.

NexIsDumb commented 6 months ago

thats not the getter and setter is, we meant the one that haxe gives you as possibility want me to make a commit to your pr to help ya?

Jamextreme140 commented 6 months ago

thats not the getter and setter is, we meant the one that haxe gives you as possibility want me to make a commit to your pr to help ya?

Thanks, but now I think I got it. Check the last commit. (Note: Already tested and works fine)

NexIsDumb commented 6 months ago

oh ye you did it :D though i think itd be better if you added __audioSource only for the new openfl, so like do the compiler check and its good :D

Jamextreme140 commented 6 months ago

I don't know what did you meant with that.

The reason of this PR is because the overriden openfl.media.SoundChannel class in source has conflict with the installed library on haxelib (in case you decide to upgrade it), specifically I got this error: FlxSound.hx:[...] openfl.media.SoundChannel has no field "__audioSource"

NexIsDumb commented 6 months ago

hmm alr then lets leave it like that, you tested everything right?

Jamextreme140 commented 6 months ago

Yeah, it compiles and game running fine. (I always test before commit)

NexIsDumb commented 6 months ago

great then, just tested aswell, looks great :D tysm for ur time on the enginee

Jamextreme140 commented 6 months ago

great then, just tested aswell, looks great :D tysm for ur time on the enginee

My pleasure :3