Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any explanation? #1

Open
zarocksx opened this issue Jan 31, 2020 · 5 comments
Open

Any explanation? #1

zarocksx opened this issue Jan 31, 2020 · 5 comments

Comments

@zarocksx
Copy link

This node look really cool!
But without any explanation noobs like me are lost.
I'm ectually trying to use it in a new project but I'm not able use it, a simple switch background color when a button is pressed on mobile cool be very usefull !

-Do we need to export it on https to make it work?
-Do we only need to import the godot-airconsole.gd as a singleton or there is more settings?
-what about the controller scene?
-what about the game scene?

thxs a lot anyway !

@DleanJeans
Copy link
Owner

DleanJeans commented Jan 31, 2020

You'll need to copy/clone the repo into your addons folder as a folder called godot-airconsole.
From there you can either:

  • Add AirConsole.gd as a singleton
  • Or add AirConsole as a node into your main scene (should be available from the Add Node menu)

You'll also need to add this to your .html export.

<script type="text/javascript" src="https://www.airconsole.com/api/airconsole-1.7.0.js"></script>

The node is just an interface to talk to AirConsole API so there's no controller or game scene, both of which is up to your implementation.

Take a look at this node.
I pulled it from the game I made a year ago. IIRC everything in the game goes through the node: player joining, player quitting and gamepad inputs.

If you still got any questions, feel free to ask.

@201flaviosilva
Copy link

@DleanJeans I think it would be cool for this explanation in the repository readme or wiki :)

@DleanJeans
Copy link
Owner

Thanks for the suggestion. It didn't happen to me that I should have added a README.
This actually needs an update since it was written when there was no way to call GDScript from JavaScript so I had to use a workaround. Since then there has been updates to the JavaScript singleton. I'll try to push an update over the next week.

@201flaviosilva
Copy link

Ohhh cool, I didn't happen to know about this new feature.
By the way, no stress, do the update when you have a little time. I'm developing a game that I would like to test with the air console functionality, but first I still have to make the game playable 😅

@201flaviosilva
Copy link

@DleanJeans Just a suggestion, after doing the update, can you make a very simple minigame/example on how to use it?
I understand things better by seeing examples 😅 : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants