|
|
@ -30,7 +30,8 @@ import java.util.* |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Suppress("unused") |
|
|
|
@Suppress("unused") |
|
|
|
class ExplosionView : View { |
|
|
|
class ExplosionView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : |
|
|
|
|
|
|
|
View(context, attrs) { |
|
|
|
|
|
|
|
|
|
|
|
private var customDuration = ExplosionAnimator.DEFAULT_DURATION |
|
|
|
private var customDuration = ExplosionAnimator.DEFAULT_DURATION |
|
|
|
private var idPlayAnimationEffect = 0 |
|
|
|
private var idPlayAnimationEffect = 0 |
|
|
@ -40,24 +41,7 @@ class ExplosionView : View { |
|
|
|
private val mExplosions = ArrayList<ExplosionAnimator>() |
|
|
|
private val mExplosions = ArrayList<ExplosionAnimator>() |
|
|
|
private val mExpandInset = IntArray(2) |
|
|
|
private val mExpandInset = IntArray(2) |
|
|
|
|
|
|
|
|
|
|
|
constructor(context: Context) : super(context) { |
|
|
|
init { |
|
|
|
init() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { |
|
|
|
|
|
|
|
init() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super( |
|
|
|
|
|
|
|
context, |
|
|
|
|
|
|
|
attrs, |
|
|
|
|
|
|
|
defStyleAttr |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
init() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun init() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Arrays.fill(mExpandInset, Utils.dp2Px(32)) |
|
|
|
Arrays.fill(mExpandInset, Utils.dp2Px(32)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|