Bee Enemy

Add a new folder for the Bee

Use the Sprites provided in the Pixel Adventure 2 Pack

For the BeeDead Sprite

Use the first Frame of the Idle Animation

Animations

Set up animations for IDLE, ATTACK and HIT using the sprite sheets provided.

The animation speed is 20FPS and IDLE is the only animation which loops.

BeeDead, BeeBullet, BeeBulletPiece1 and BeeBulletPiece2

are all single frames not looping.

The Bee will hover and then attack 

when the player is within a certain range.

Once the Bee is within range and attacking

Spawn bullets

The Bee should have TWO sine behaviours

The first is for horizontal movement

The second is for vertical movement

This will create a figure 8 flying pattern.

Use the settings shown.

The Bee Bullet (Sting)

Should have the Bullet behaviour

With settings shown.

Bee Bullet Piece 1 & 2

Should have: 

Physics behaviour

Flash Behaviour

With settings shown.

CODE

When the Bee starts it will attack the player if within range

Otherwise it will play the idle animation.

If the Bee is attacking

It will drop stingers.

We do this for each Bee

In case there is more than one Bee in the level.

When the Bee collides with the Player

Either the Bee dies

If the player stomped it from above

Or the Player gets hurt

And we call the Hit function


When the Bullet hits a Solid object

It should break apart and fragment

We should spawn the bullet pieces

Apply physics forces to them

Then make them flash

Before destroying them.

When a Bullet hits the Player

It should also split into pieces

Apply physics to the pieces

Call the Hit function of the Player.