public ClassMoving(ClassBall Ball, ClassRacket Racket, Size Size) { this.Ball = Ball; this.Racket = Racket; this.Size = Size; LoadMap(RandomMap()); }
private void FormArkanoid_Load(object sender, EventArgs e) { // создание мячика и ракетки (и отрисовка на панели) Ball = new ClassBall(panel1); Ball.BallLost += new ClassBall.BallLost_event(Ball_BallLost); Racket = new ClassRacket(panel1); timerArkanoid.Interval = 1; Moving = new ClassMoving(Ball, Racket, panel1.Size); Moving.BallCrossing += new ClassMoving.BallCrossing_event(Moving_BallCrossing); Moving.ToNextLevel += new ClassMoving.ToNextLevel_event(Moving_ToNextLevel); Moving.NoLevels += new ClassMoving.NoLevels_event(Moving_NoLevels); // Новая игра: загрузка карты уровня - случайно NewGame("Случайно"); }