So. Im trying to create an "Alien Invasion" inspired game. And i was wondering how to correctly create a variable with an if statement.
Fx.
if (gunIsShot){
// Create variable 'theShot'
}
var theShot{
// theShot configs
}
Thanks