Ad system - Team-Swamp/IceBites GitHub Wiki

Overview

Our ad system is designed with simplicity in mind, randomly selecting an ad from the list to display when prompted. When triggered, the ad appears as a pop-up with a cross button for easy closure. This button gradually fills up clockwise, providing users with a clear indication of when they can close the ad at their convenience.

Writen by - Bas

Usage

Ad system methods Return Description
+ ToggleAdVisibility void Toggle the visibility of the ad, also sets a new ad.
- SetRandomAd Sprite Return a random ad sprite form the ads list
Cross button methods Return Description
+ SetLoad(bool) void Set the load property and timer can count, if false then the button will disable
- InitCrossButton void Initialize the cross button
- UpdateLoading void Updates the loading of the cross button visibility

Source

You want to see how it works look at the following scripts: