Last active
September 21, 2018 17:36
-
-
Save ar-android/ec2391d4619a06b26db693c6b31de6fb to your computer and use it in GitHub Desktop.
Game Block Character
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun drawGameBlock(canvas: Canvas?) { | |
var startX = (width - 300).toFloat() | |
var startY = (height / 2 - 160).toFloat() | |
var stopX = startX | |
val stopY = 0F | |
canvas?.drawLine(startX, startY, stopX, stopY, paintBlock) | |
canvas?.drawLine(startX, startY + 300F, stopX, height.toFloat(), paintBlock) | |
startX -= 700F | |
startY -= 100 | |
stopX = startX | |
canvas?.drawLine(startX, startY, stopX, stopY, paintBlock) | |
canvas?.drawLine(startX, startY + 300F, stopX, height.toFloat(), paintBlock) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment