Open Niclas-Cravaack opened 1 year ago
Poste auch den Link zu deinem Code
Also ich kriege prompt die Meldung
Main.ts:35 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'spriteSheedPath')
at HTMLDocument.start (Main.ts:35:43)
at startInteractiveViewport (Autoview.js:73:10)
Der Astronaut in Zeile 35 wird wohl nicht definiert, wo oder wann sollte das geschehen?
der wird eigentlich in Zeile 39 definiert in 35 wird ja nur die Textur für den astronauten geladen. Ich versteh nicht was ich da ändern müsste
Also in Zeile 35 steht im Code nichts ich hab jetzt auf mehreren Wegen versucht die Sprites aufzurufen und den Astronaut zu initialisieren. Ich versteh nicht wo das Problem damit liegt
Das lese ich ab Zeile 35
await astronautTexture.load(astronaut.spriteSheedPath);
//creating and setting up the Astronaut
astronaut = new Astronaut(astronautTexture);
Du greifst also auf die Eigenschaft spriteSheedPath
(was wahrscheinlich spriteSheetPath
heißen soll) des Austronatuen zu, den Du erst zwei Zeilen später erzeugst.
I have the problem that my sprites are not displayed. I have no idea why that is, does anyone have an idea? here is the link to my project https://niclas-cravaack.github.io/PRIMA/SpaceFighters/index.html I hope someone can help.