This commit is contained in:
skysamara 2022-09-03 11:26:59 +03:00
parent 930b93f91b
commit f92f27c647

View File

@ -24,14 +24,14 @@ class Shots {
fun draw(canvas: Canvas?, screenWidth: Int, screenHeight: Int) { fun draw(canvas: Canvas?, screenWidth: Int, screenHeight: Int) {
val paintWite: Paint = Paint() val paintWite: Paint = Paint()
paintWite.apply { paintWite.apply {
style = Paint.Style.FILL // стиль Заливка style = Paint.Style.FILL
color = Color.WHITE // белая кайма вокруг color = Color.WHITE
} }
val paintBlack: Paint = Paint()
val paintBlack: Paint = Paint()
paintBlack.apply { paintBlack.apply {
style = Paint.Style.FILL // стиль Заливка style = Paint.Style.FILL
color = Color.BLACK // белая кайма вокруг color = Color.BLACK
} }
randomizeShots(screenWidth, screenHeight) randomizeShots(screenWidth, screenHeight)
@ -39,7 +39,7 @@ class Shots {
val x = shot.x val x = shot.x
val y = shot.y val y = shot.y
var radius: Int = (screenWidth + screenHeight) / 100 var radius: Int = (screenWidth + screenHeight) / 90
canvas!!.drawCircle(x.toFloat(), y.toFloat(), radius.toFloat(), paintWite) canvas!!.drawCircle(x.toFloat(), y.toFloat(), radius.toFloat(), paintWite)
radius = (screenWidth + screenHeight) / 120 radius = (screenWidth + screenHeight) / 120