Open reymesson1 opened 5 years ago
override fun onTick(l: Long) {
timeLeftInMilliseconds = l var params = blocks1.getLayoutParams() as LinearLayout.LayoutParams var paramsBullet = bullet.layoutParams as FrameLayout.LayoutParams params.setMargins(90,moveBlocks,0, 0) paramsBullet.setMargins(90,moveBullet,0, 0) var rnds = (50..99).random() moveBlocks+=10 moveBullet-=10 blocks1.layoutParams = params bullet.layoutParams = paramsBullet if(moveBlocks.equals(moveBullet)){ countDownTimer?.cancel() } updateTimer() }
if(moveBlocks.equals(moveBullet)){
countDownTimer?.cancel() }
override fun onTick(l: Long) {