https://www.dropbox.com/sh/ctnsz8712p7y ... 1xAca?dl=0
Code: Select all
GRAPHICS
GRAPHICS CLEAR 1,1,1
OPTION ANGLE DEGREES
OPTION SPRITE POS CENTRAL
OPTION IMAGE POS CENTRAL
OPTION TEXT POS CENTRAL
SET ORIENTATION LANDSCAPE
SET TOOLBAR OFF
maxx=SCREEN_WIDTH()
maxy=SCREEN_HEIGHT()
DRAW ALPHA 0.8
DRAW IMAGE "System/grass.png" AT maxx/2,maxy/2 SCALE 1.5
d$="das"
BUTTON d$ TEXT "выход" AT 3/2*(maxx/23),(maxy-2*(maxx/23)) SIZE (maxx/23)*3,(maxx/23)*2
'данные игры
s=0.19
lv$="perch"
pnx=350 ! pnx= 220
pvx=350 ! pvy=122
lnx=103 ! lny=179
lvx=103 ! lvy=118 ! se=0.03
x=.2 ! y=.12
b=0 ! n=1.5
sch$=0 ! sche$=" Счет: "
' размер экрана 568,320
SPRITE "hen_pv" LOAD "System/hen3.png"
SPRITE "hen_pv" AT 500,92 SCALE s
SPRITE "hen_pv" COPY "hen_lv"
SPRITE "hen_lv" AT 70,92 SCALE s FLIP 1
SPRITE "hen_pv" COPY "hen_ln"
SPRITE "hen_ln" AT 70,152 SCALE s FLIP 1
SPRITE "hen_pv" COPY "hen_pn"
SPRITE "hen_pn" AT 500,152 SCALE s
SPRITE "hen_pv" SHOW
SPRITE "hen_lv" SHOW
SPRITE "hen_ln" SHOW
SPRITE "hen_pn" SHOW
'рисование насеста
DRAW COLOR 0,0,0
SPRITE lv$ BEGIN 50,10
DRAW SIZE 10
DRAW LINE 0,0 TO 45,0
SPRITE END
SPRITE lv$ AT 70,125
SPRITE lv$ COPY "perch_pv"
SPRITE "perch_pv" AT 505,125
SPRITE lv$ COPY "perch_pn"
SPRITE "perch_pn" AT 505,185
SPRITE lv$ COPY "perch_ln"
SPRITE "perch_ln" AT 70,185
SPRITE lv$ COPY "perch_lvu"
SPRITE "perch_lvu" RESIZE 100,10
SPRITE "perch_lvu" AT 130,149 ANGLE 30
SPRITE "perch_lvu" COPY "perch_lnu"
SPRITE "perch_lnu" AT 130,209 ANGLE 30
SPRITE "perch_lvu" COPY "perch_pvu"
SPRITE "perch_pvu" AT 449,144 ANGLE -30
SPRITE "perch_lvu" COPY "perch_pnu"
SPRITE "perch_pnu" AT 449,204 ANGLE -30
SPRITE "perch_pnu" SHOW
SPRITE "perch_pvu" SHOW
SPRITE "perch_lnu" SHOW
SPRITE "perch_lvu" SHOW
SPRITE "perch_ln" SHOW
SPRITE "perch_pn" SHOW
SPRITE "perch_pv" SHOW
SPRITE lv$ SHOW
SPRITE "b_egg" LOAD "System/broken egg.png"
SPRITE "b_egg" AT 175,280 SCALE se
SPRITE "b_egg" SHOW
SPRITE "b_egg" ALPHA 0
SPRITE "b_egg" COPY "dead_lives"
SPRITE "dead_lives" AT 350,60 SCALE se
SPRITE "dead_lives" SHOW
SPRITE "dead_lives" ALPHA 1
SPRITE "dead_lives" HIDE
SPRITE "masha_up_pv" LOAD "System/Masha up.png"
SPRITE "masha_up_pv" AT 345,220 SCALE 0.15 FLIP 1
SPRITE "masha_up_pv" SHOW
SPRITE "masha_up_pv" COPY "masha_up_lv"
SPRITE "masha_up_lv" AT 230,220 SCALE .15
SPRITE "masha_ln" LOAD "System/Masha.png"
SPRITE "masha_ln" AT 230,205 SCALE 0.09 ANGLE 10
SPRITE "masha_ln" COPY "masha_pn"
SPRITE "masha_pn" AT 345,205 SCALE .09 ANGLE 10 FLIP 1
SPRITE "masha_pn" SHOW
SPRITE "masha_pn" HIDE
SPRITE "masha_ln" SHOW
SPRITE "masha_ln" HIDE
SPRITE "masha_up_lv" SHOW
SPRITE "masha_up_lv" HIDE
SPRITE "egg" LOAD "System/egg2.png"
SPRITE "egg" AT lvx,lvy SCALE se
SPRITE "egg" DELAY 0.01
SPRITE "egg" SHOW
SPRITE "egg" LOOP
SPRITE "egg" COPY "egg1"
SPRITE "egg1" AT lnx,lny SCALE se
SPRITE "egg1" DELAY .01
SPRITE "egg1" SHOW
SPRITE "egg1" HIDE
LOOP:
SPRITE "egg" DA 5 DX x DY y
GET SPRITE "egg" POS x1,y1
IF x1 >= 175 OR x2 >=175 THEN
x=0 ! y=1.5 ! xe1=0 ! ye1=0
ENDIF
DRAW TEXT sche$ AT 350,30
FIELD "schet" BACK ALPHA 0
FIELD "schet" TEXT sch AT 380,14
IF SPRITES_COLLIDE ("egg","b_egg")=1 THEN
SPRITE "egg" HIDE
SPRITE "egg" STOP
SPRITE "b_egg" ALPHA 1
SPRITE "dead_lives" SHOW
ENDIF
GET TOUCH 0 AS h,w
IF SPRITE_HIT ("hen_lv",h,w)=1 THEN
SPRITE "masha_up_pv" HIDE
SPRITE "masha_pn" HIDE
SPRITE "masha_ln" HIDE
SPRITE "masha_up_lv" SHOW
ENDIF
IF SPRITE_HIT ("hen_pv",h,w)=1 THEN
SPRITE "masha_up_lv" HIDE
SPRITE "masha_pn" HIDE
SPRITE "masha_ln" HIDE
SPRITE "masha_up_pv" SHOW
ENDIF
IF SPRITE_HIT ("hen_ln",h,w)=1 THEN
SPRITE "masha_up_pv" HIDE
SPRITE "masha_pn" HIDE
SPRITE "masha_up_lv" HIDE
SPRITE "masha_ln" SHOW
ENDIF
IF SPRITE_HIT ("hen_pn",h,w)=1 THEN
SPRITE "masha_up_pv" HIDE
SPRITE "masha_ln" HIDE
SPRITE "masha_up_lv" HIDE
SPRITE "masha_pn" SHOW
ENDIF
IF SPRITES_COLLIDE ("egg","masha_up_lv")=1 THEN
SPRITE "egg" END
SPRITE "egg" HIDE
SPRITE "egg1" LOOP
SPRITE "egg1" SHOW
sch=sch+1
ENDIF
IF SPRITES_COLLIDE ("egg1","masha_ln")=1 THEN
SPRITE "egg1" HIDE
SPRITE "egg1" STOP
sch=sch+1
ENDIF
xe1=.2 ! ye1=.12
GET SPRITE "egg1" POS x2,y2
SPRITE "egg1" DA 5 DX xe1 DY ye1
IF SPRITES_COLLIDE ("egg1","b_egg")=1 THEN
SPRITE "egg1" STOP
SPRITE "egg1" HIDE
SPRITE "b_egg" ALPHA 1
SPRITE "dead_lives" SHOW
ENDIF
IF BUTTON_PRESSED (d$) THEN
SET TOOLBAR ON
ENDIF
GOTO LOOP