#pragma require "BubbleGun.asc"
#include "MLLE-Weapons.asc"
#pragma require "BubbleGun-mlle.j2a"
namespace BubbleGun {
class Weapon : MLLEWeapons::WeaponInterface {
Weapon() {
super(
regularObjectTemplate: MLLEWeapons::ObjectTemplate(
xSpeed: 1.5,
xAcc: 0.125,
animSpeed: 1,
killAnim: jjAnimSets[ANIM::AMMO].firstAnim + 82,
curAnim: jjAnimSets[ANIM::AMMO].firstAnim + 8,
lightType: LIGHT::POINT2,
counterEnd: 105,
state: STATE::FLY
),
powerupObjectTemplate: MLLEWeapons::ObjectTemplate(
xSpeed: 2,
xAcc: 0.1875,
animSpeed: 2,
killAnim: jjAnimSets[ANIM::AMMO].firstAnim + 82,
curAnim: 0,
lightType: LIGHT::POINT2,
counterEnd: 105,
state: STATE::FLY
),
animSetFilename: "BubbleGun-mlle.j2a",
pickupAnimation: jjAnimSets[ANIM::AMMO].firstAnim + 8,
poweredUpPickupAnimation: 0,
ammoCrateAnimation: 2,
powerupAnimation: 1,
behavior: function(obj, powerup) {
jjSample(obj.xPos, obj.yPos, SOUND::COMMON_PLOP2);
obj.behavior = Behavior;
}
);
}
}
void Behavior(jjOBJ@ bubble) {
if (jjMaskedPixel(int(bubble.xPos) + int(bubble.xSpeed), int(bubble.yPos)) || jjMaskedPixel(int(bubble.xPos) - int(bubble.xSpeed), int(bubble.yPos)) || jjMaskedPixel(int(bubble.xPos), int(bubble.yPos) + int(bubble.ySpeed)) || jjMaskedPixel(int(bubble.xPos), int(bubble.yPos) - int(bubble.ySpeed))) {
jjSample(bubble.xPos, bubble.yPos, SOUND::P2_SPLOUT);
}
bubble.behave(BEHAVIOR::WATERSHIELDBULLET);
if (MLLEWeapons::HelpfulBulletFunctions::IsPowerup(bubble) && bubble.state == STATE::FLY && bubble.counter > 0) {
switch (bubble.direction) {
case 1: bubble.xSpeed -= 0.08; bubble.ySpeed -= 0.08; break;
case -1: bubble.xSpeed += 0.08; bubble.ySpeed -= 0.08; break;
}
}
}
}
Jazz2Online © 1999-INFINITY (Site Credits). We have a Privacy Policy. Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats.
Eat your lima beans, Johnny.