ture (' models tower_crack 7.png ') if PasPlayer.Life> 20 then PasPlayer.ChangePicture (' models tower_crack 8.png ') if PasPlayer. Life> 10 then PasPlayer.ChangePicture ('models tower_crack 9.png') if PasPlayer.Life> 0 then PasPlayer.ChangePicture ('models tower_crack 10.png');
end;
{Приховування графічних елементів} Hidden;
beginInfoTime.Visible = TRUE then InfoTime.Visible: = FALSE; InfoStep.Visible = TRUE then InfoStep.Visible: = FALSE; Player1.Visible = TRUE then Player1.Visible: = FALSE; Player2.Visible = TRUE then Player2.Visible: = FALSE; PowerP1.Visible = TRUE then PowerP1.Visible: = FALSE; PowerP2.Visible = TRUE then PowerP2.Visible: = FALSE; Celebration.Visible = TRUE then Celebration.Visible: = FALSE;
end;
{Показати графічні елементи} Show;
beginInfoTime.Visible = FALSE then InfoTime.Visible: = TRUE; InfoStep.Visible = FALSE then InfoStep.Visible: = TRUE; Player1.Visible = FALSE then Player1.Visible: = TRUE; Player2.Visible = FALSE then Player2.Visible: = TRUE; PowerP1.Visible = FALSE then PowerP1.Visible: = TRUE; PowerP2.Visible = FALSE then PowerP2.Visible: = TRUE;;
{Події} KeyDown (key: integer); (Angle> 135) then Angle - = 2; (Angle <45) then Angle + = 2; (Speed> 98) then Speed - = 2; (Speed ​​<1) then Speed ​​+ = 2; key of_Right: = 2;. Redraw;. Redraw; (clWhite); (50 + ActPlayer.x, ActPlayer.y, 50 + ActPlayer.x + Round (50 * cos ((0 + Angle) * pi/180)), ActPlayer.y-Round (50 * sin ((0 + Angle) * pi/180)));; _Left: + = 2;. Redraw; . Redraw; (clWhite); (50 + ActPlayer.x, ActPlayer.y, 50 + ActPlayer.x + Round (50 * cos ((0 + Angle) * pi/180)), ActPlayer.y-Round (50 * sin ((0 + Angle) * pi/180)));; _Enter: EventEnable = 1 then begin (Speed/1.5, Angle);: = 0; + = 1;: = TRUE;. Redraw;. Redraw;; ; _Up: (clRed); (ActPlayer.X + ActPlayer.Power_x + Speed, ActPlayer.Y +80, ActPlayer.X + ActPlayer.Power_x + Speed, ActPlayer.y +62); + = 2;; _Down: (clWhite ); (ActPlayer.X + ActPlayer.Power_x + Speed, ActPlayer.Y +80, ActPlayer.X + ActPlayer.Power_x + Speed, ActPlayer.y +62); = 2;;; {кінець case}; Mouse (x, y, mousebutton: integer); ButtonStart.PtInside (x, y) then begin.Destroy;. MoveTo (20, 50);: = TRUE;. Visible: = TRUE;; ButtonExit.PtInside (x, y) then begin; ; ButtonRestart.PtInside (x, y) then begin;;;; {кінець класу}: CGame: = new CGame; Game.Start <> TRUE do sleep (500);. Player1.PName: = 'Орк'; . Player2.PName: = 'Гендальф';. Player1.PColor: = clGold;. Player2.PColor: = clWhite;. Player1.LifeInit;. Player2.LifeInit;
Game.GameInit;.
Додаток Б
Технічне завдання по ГОСТ 19.201-78 ЕСПД
Б1. Введення
Найменування програми