Downloads containing xlmbb.j2as

Downloads
Name Author Game Mode Rating
JJ2+ Only: Byzantine BluesFeatured Download Jelly Jam Capture the flag 8.5 Download file

File preview

void onLevelLoad() {
	jjTexturedBGTexture = TEXTURE::RANEFORUSV;
	jjUseLayer8Speeds = true;
	jjObjectPresets[OBJECT::BOUNCERBULLET].behavior = bouncer;

	 jjLayerOrderSet(array<jjLAYER@> = {jjLayers[2], jjLayers[3], jjLayers[4], jjLayers[5], jjLayers[6], jjLayers[7], jjLayers[1], jjLayers[8]});
}

void onMain() {

	for (int i = 1; i < jjObjectCount; i++) { 
	   jjOBJ@ o = jjObjects[i];
	   if (o.isActive) {
	       if (o.behavior == BEHAVIOR::PICKUP && o.state == STATE::FLOATFALL) {
		     o.state = STATE::FLOAT;
	        }
	   }
	}
}

void bouncer(jjOBJ@ obj) {
    float xSpeed = obj.xSpeed;
    float ySpeed = obj.ySpeed;
    obj.behave(BEHAVIOR::BOUNCERBULLET);
    if (xSpeed * obj.xSpeed < 0.f && ySpeed * obj.ySpeed < 0.f) {
        if (!jjMaskedPixel(int(obj.xPos + obj.xSpeed), int(obj.yPos + ySpeed))) {
            obj.var[0] = obj.var[0] - 1;
            obj.ySpeed = ySpeed;
            if (ySpeed > 0.f)
                obj.yPos += ySpeed;
        }
    }
}