rezoner / unfinished-asteroids Goto Github PK
View Code? Open in Web Editor NEWIT STARTS HERE --->
Home Page: https://github.com/rezoner/unfinished-asteroids/wiki
License: MIT License
IT STARTS HERE --->
Home Page: https://github.com/rezoner/unfinished-asteroids/wiki
License: MIT License
Hello Boss :)
I didn't reach Mike, so I thought I may ask you.
I never did something with spritesheets before, so I'd like to ask you how I should extract the bullets from the spritesheet. Should I count the pixels and then put them in a sprite array or what?
Thank you for the answer
tobipch
I have loaded the sounds using this.loadSounds()
in App.js but when I go to call this.playSound("shoot");
in Player.js I get the following console error
TypeError: this.playSound is not a function
Hi I'm having trouble getting the coins to animate (and your subreddit has been archived so I can't comment there).
I'm assuming I have to update the sprite in the step
function, here's what I've got so far...
var new_sprite = [];
var index = this.sprites.indexOf(this.sprite);
if (index+1 <= this.sprites.length) {
new_sprite = this.sprites[index+1];
} else {
new_sprite = this.sprites[0];
}
This didn't work, I have also tried the following:
var sprite_index = this.sprites.indexOf(this.sprite);
this.sprite = (sprite_index+1 <= this.sprites.length) ? this.sprites[sprite_index+1] : this.sprites[0];
I use this.sprite
in a drawReqion call in my render
function.
Both methods give me the following error:
CanvasQuery.js:438 Uncaught TypeError: Cannot read property '0' of undefined
Any tips on how to do this? you're playground.js docs talk about using an Atlas, but that doesn't seem relevant to this example.
Hello :)
I have a question about how I could access the player who shot the asteroid from Asteroid.js (hit function). Is there something I can do over app.?
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.