Class BannerAd
public class BannerAd : IAdPartialScreen, IAd, IAdLoadRetryHandler
Implements:
MatchinghamGames.VegasModule.IAdPartialScreen, MatchinghamGames.VegasModule.IAd, MatchinghamGames.VegasModule.IAdLoadRetryHandler
Properties
Enabled
public bool Enabled { get; }
IsLoaded
If banner is loaded
public bool IsLoaded { get; }
IsLoading
If banner is loading now
public bool IsLoading { get; }
IsShowing
If banner is on screen now
public bool IsShowing { get; }
IsDestroyed
If banner is destroyed
public bool IsDestroyed { get; }
RetryAttempt
Attempt count to reload banner
public int RetryAttempt { get; set; }
Data
Current data of the banner
public AdDTO Data { get; }
RevenueData
Current revenue data of the banner
public AdRevenueDTO RevenueData { get; }
ErrorData
Current error data of the banner
public AdErrorDTO ErrorData { get; }
Methods
Initialize()
public void Initialize()
Load()
Load banner manually If no ads is active, it won't work.
public void Load()
Show(string)
Show banner manually If no ads is active, it won't work.
public void Show(string adTag = null)
Parameters
Type | Name |
---|---|
System.String | adTag |
Hide()
Hide banner manually
public void Hide()
Destroy()
Destroy banner manually
public void Destroy()
Events
FailedToLoad
Invokes when banner fails to load
public event Action FailedToLoad
Event Type
System.Action
Loaded
Invokes when banner is loaded
public event Action Loaded
Event Type
System.Action
LoadedStatusChanged
Invokes when banner load status is changed
public event Action LoadedStatusChanged
Event Type
System.Action
Shown
Invokes when banner is opened
public event Action<AdDTO> Shown
Event Type
System.Action<MatchinghamGames.VegasModule.AdDTO>
Clicked
Invokes when banner is clicked by user
public event Action Clicked
Event Type
System.Action
Hidden
Invokes when banner is hidden
public event Action Hidden
Event Type
System.Action
Destroyed
Invokes when banner is destroyed
public event Action Destroyed
Event Type
System.Action
AdDataObtained
Invokes when a banner ad data is obtained
public event Action<AdDTO> AdDataObtained
Event Type
System.Action<MatchinghamGames.VegasModule.AdDTO>
RevenueDataObtained
Invokes when a banner ad revenue data is obtained
public event Action<AdDTO, AdRevenueDTO> RevenueDataObtained
Event Type
System.Action<MatchinghamGames.VegasModule.AdDTO,MatchinghamGames.VegasModule.AdRevenueDTO>
ErrorDataObtained
Invokes when a banner ad error data is obtained
public event Action<AdDTO, AdErrorDTO> ErrorDataObtained
Event Type
System.Action<MatchinghamGames.VegasModule.AdDTO,MatchinghamGames.VegasModule.AdErrorDTO>