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

TypeError with system args #47

Closed
StolenPkM opened this issue Feb 6, 2020 · 3 comments
Closed

TypeError with system args #47

StolenPkM opened this issue Feb 6, 2020 · 3 comments

Comments

@StolenPkM
Copy link

Hi, i'm new and tried to use react-native-game-engine but i got an error when i create a new systems for . After some research still dont understand why.
Capture d’écran 2020-02-06 à 12 23 08

i'm at the beginning so this is my code.

Capture d’écran 2020-02-06 à 12 25 08

and my systems code

Capture d’écran 2020-02-06 à 12 25 47

@bberak bberak changed the title Typescript error with system args TypeError with system args Feb 6, 2020
@bberak
Copy link
Owner

bberak commented Feb 6, 2020

Hi @StolenPkM,

That's very odd, your code looks fine to me..

Can you replace the line where you set your systems prop with this (just for debugging):

systems={[(entities) => { console.log("tick"); return entities; }]} 

The RNGE library also contains a component called GameLoop (not recommended for use), are you importing that anywhere? (Doesn't look like it - but can't hurt to ask)..

Anyhow, let me know if the change above shows up in the console and we'll go from there :)

@StolenPkM
Copy link
Author

Hi @bberak ! thanks for your quick answer !
your sentence :
systems={[(entities) => { console.log("tick"); return entities; }]} works!
that's odd because now i retry like as wrote before and now it's work too.

Thanks a lot !

@bberak
Copy link
Owner

bberak commented Feb 6, 2020

Awesome @StolenPkM!

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

2 participants