Tree Enemy

153 Add a new folder for Enemies

Add a folder for the Mushroom.

Add a new folder for the Tree enemy

154 Add a new Sprite object to the Tree Folder

155 Import the different animations for the tree enemy. They are in the Enemies - Trunk - folder

156 Idle has 18 horizontal cells

157 Run has 14 horizontal cells

158 Attack has 11 Horizontal cells

159 Hit has 5 Horizontal cells

160 Mirror all the animations so that the Tree is facing right.

161 Add a new image point to the Attack Animation.

Name the image point ShootPoint.

Apply it to every frame in the animation.

162 Add your Tree to the Temp Layout

163 Add Platform behaviour to the Tree.

Place a tree in the level.

Set the size to 128 x 64.

Reduce the Max speed to 60.

164 Add an instance variable to the Tree.

Name it CanWalk

Make it a Boolean

Set the initial value to true.

Tree Animations

165 Add a new Sprite to the Tree Folder.

Use the TrunkBullet image, name it TreeBullet

166 Add the Bullet Behaviour to the TreeBullet.

Add the TreeBullet to the Temp layout.

Increase speed to 500:

167 Save these images for new Tree Sprites:


Add the Sprites to your Temp Layout

TreeBulletPiece1


TreeBulletPiece2


TreeDead

168 Add the Physics Behaviour and Flash Behaviour to the Bullet Pieces leave all settings on default.

Set their sizes to 32 x 32

169 Add the Platform and Rotation behaviour to the tree.

170 Add Enemies to the level: