Hello,
While I'm rewriting some games to meet Google's requirements I thought about restructuring things a bit with the creation of extra classes.
While my old code was like
[main activity]
\game init/start
\ad init & handler sub
\in-app purchases manager init & handler subs
[game class]
[tween class]
I now tried to go for
[main activity]
\game init/start
\ad init
\in-app purchases init
[game class]
[tween class]
[consent+interstitial class]
[in-app purchases class]
while for example it's easy to set values from in the in-app class like
it's more difficult to use a sub like
as it simply doesn't show up in the intellisense.
is a solution but then I keep having in-app code in the main activity.
----------
I also tried the method below as sub inside the in-app class which would've been perfect if it worked
but that required me to move the dim game to Process Globals but then the log showed an error that it wasn't allowed due to some referencing or something?
Is there a more ideal way to do this that I'm not aware of to keep things really seperate and not just 50/50?
While I'm rewriting some games to meet Google's requirements I thought about restructuring things a bit with the creation of extra classes.
While my old code was like
[main activity]
\game init/start
\ad init & handler sub
\in-app purchases manager init & handler subs
[game class]
[tween class]
I now tried to go for
[main activity]
\game init/start
\ad init
\in-app purchases init
[game class]
[tween class]
[consent+interstitial class]
[in-app purchases class]
while for example it's easy to set values from in the in-app class like
B4X:
main.remove_ads
it's more difficult to use a sub like
B4X:
main.purchased_noAds
as it simply doesn't show up in the intellisense.
B4X:
CallSum(main,"purchased_noAds")
is a solution but then I keep having in-app code in the main activity.
B4X:
Sub Purchased_NoAds
game.remove_ads 'remove ad remover/restore buttons from the game menu
remove_Ads=True 'used in the ads subs to bypass things
End Sub
----------
I also tried the method below as sub inside the in-app class which would've been perfect if it worked
B4X:
Sub Purchased_NoAds
main.game.remove_ads
main.remove_Ads=True
End Sub
but that required me to move the dim game to Process Globals but then the log showed an error that it wasn't allowed due to some referencing or something?
Is there a more ideal way to do this that I'm not aware of to keep things really seperate and not just 50/50?