12345678910111213141516171819202122232425262728 |
- //
- // InterstitialAdWaiter.cpp
- // redream_runtime
- //
- // Created by Chao on 2023/5/24.
- //
- #include "InterstitialAdWaiter.hpp"
- #include "AdUtils.h"
- namespace redream {
- InterstitialAdWaiter* InterstitialAdWaiter::create(ReboltRedManager* rrm, red::RedBehaviacTree* fatherTree, std::string adName) {
- InterstitialAdWaiter* waiter = new InterstitialAdWaiter();
- waiter->autorelease();
- waiter->setFatherTree(fatherTree);
- waiter->setReboltRedManager(rrm);
- waiter->_adName = adName;
- return waiter;
- }
- void InterstitialAdWaiter::run(ReboltErrorInfo& errorInfo) {
- auto callback = [this](){
- onSuccessEnd();
- };
- ad::AdUtils::shared()->getInterstitialUtils()->show(_adName, callback);
- }
- }
|