I want to add condition in constructor for angle if(angle>360){ angle=0; }
how to do?
PLAYER[i] = {
color: "#fff",
x: 220*i,
y: 270,
width: 32,
height: 32,
angle: 180
};
each time to use such a condition, takes a lot of space.