package com.base.appzxhy.business.ads

abstract class AdsShowCallBack {

    var adShowed: Boolean = false
    var nextCalled: Boolean = false

    open fun show() {
        adShowed = true
    }

    open fun failed(where: Int = 0) {
        adShowed = false
        if (!nextCalled) {
            nextCalled = true
            next()
        }
    }

    open fun adFailed(where: Int = 0) {
        adShowed = false
        if (!nextCalled) {
            nextCalled = true
            next()
        }
    }

    open fun close(where: Int = 0) {
        adShowed = false
        if (!nextCalled) {
            nextCalled = true
            next()
        }
    }

    abstract fun next()

}