Closed derrick56007 closed 9 years ago
Hi @TheSneakyNarwhal In the second scenario, the 'basic_01_load_an_image' should be replaced by 'TestState'.
My mistake. It is named 'TestState' in my code but forgot to change it when I copied the example (mine had too many variables in the way).
Hi @TheSneakyNarwhal You should use "library" and "part (of)" structure in your project. (check out this link: https://www.dartlang.org/docs/dart-up-and-running/ch02.html#libraries-and-visibility)
Or you will need to import play_phaser library in your second file.
Ah, that did it! Another reason to reread dart documentation... Thanks @playif
I understand that in the example of the readme you made a subclass of State, but when I attempt to separate the subclass into a different file, the error of "Exception: type 'TestState' is not a subtype of type 'State' of 'state'" comes up. I do not know if that's intentional or if it's because of my limited knowledge of dart.
went from this (one class only), it works
to (2 files) not working for me
(Test.dart)
(TestState.dart)