We need a method that will make the player plane appear. The plane should appear on the left side of the screen, facing upwards. Like the clouds, the plane will wrap around the screen once it moves over the screen edges.
SpawnPlayer
to the class game
.Method SpawnPlayer:Int ()
player = eng.CreateImage(atlas,0,0,64,64,cw/4,ch/2)
0.7
and set the speed of the plane to 8
.player.SetScale(0.7) player.SetSpeed(8)
player.SetWrapScreen(True)
grpPlayer
and the radius to 24
pixels. As the plane is already scaled down, the actual radius will be stored as 24
times 0.7
.player.SetColGroup(grpPlayer) player.SetRadius(24)
hit
points to 0
. Then, close the method.hits=0 Return 0 End
3.144.93.222