<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" />
Navigation
</aside>
<aside> 💡 The template uses the modules of the Watermelon framework. The modules are in Assets/Project Files/Modules. This page lists each module and shows how Slope Masters uses it.
</aside>
Each module has its own documentation page in the Watermelon Core documentation. This page does not repeat the API. It links the module with the game code.
| Module | Folder | Used by the game for |
|---|---|---|
| Save | Modules/Save and Watermelon Core/Systems/Save | All persistent data. See Save Data. |
| Tween | Modules/Tween | Animations, delayed calls and timers. |
| Pool | Modules/Pool | Pools of the Coins Fever coins. |
| Audio | Modules/Audio | Sounds and the level music. |
| Particles | Modules/Particles | Burst, splash, confetti and upgrade particles. |
| Haptic | Modules/Haptic | Vibration on breakable props. |
| Currency | Modules/Currency | Coins and gems. |
| Upgrades | Modules/Upgrades | The upgrade base classes. |
| UI | Modules/UI | Overlay panels and popup helper. |
| Advertisement | Modules/Advertisement | Rewarded video and interstitials. |
| Purchasing | Modules/Purchasing | The No Ads purchase. |
| Reward | Modules/Reward | The No Ads reward. |
| Loading | Modules/Loading | The loading screen of the Init scene. |
Created by Save Controller in Project Init Settings. See Save Data.
Tween.DelayedCall, Tween.DoFloat and the extension methods such as DOMove and DOColor drive the animations of the UI, the flag, the pickups and the boosters. Timers of the boosters and of the pre-run modifiers are delayed calls. Use TweenCase.KillActive() before you start a new tween on the same target.
Use the Tween module for timers. Do not use Update for a timer.
Pool is used by the Coins Fever booster. PoolManager is added to the Initializer object by the Pool init module. A pool created by a ScriptableObject must be destroyed in Unload. See How to add a new Booster.
AudioController plays sounds by clip or by name. Names come from the Audio Registry. The game uses AudioController.GetClip("name") for sounds such as button_sound, whoosh_swing, water_splash and level_complete_01. LevelMusicController plays the music of a level.
Never create AudioSource components by hand. Use AudioController.
ParticlesController is on the Game scene. Particles are registered by name in its Particles list, for example Water Splash, Confetti, Rock Burst, Bush Burst, Upgrade Charge. Play one with ParticlesController.PlayParticle("Water Splash"). Breakable props and the pickups use the names.
Haptic.Play(Haptic.HAPTIC_LIGHT) plays a vibration. The game plays a light hit on a soft breakable prop and a hard hit on a solid breakable. The user toggles the haptic in the settings page.
See Currency & Gem Prices. The module also provides CurrencyCloud, the coin cloud of the start screen, and CurrencyUIPanelSimple, the balance panel.
See Upgrades.
The module contains the fade and swap overlay panels, the system message and UIControllerHelper. GameController uses UIControllerHelper.WaitForPopupsClose to wait until the popups that were opened at start are closed.
AdsManager shows the ads.
| Where | Call |
|---|---|
| Result page and level complete page | ShowRewardBasedVideo for the x2 button. ShowInterstitial on Continue. |
| Pre-run modifier slot | ShowRewardBasedVideo for the activation. |
| Start screen | The No Ads button and ForcedAdDisabled. |
See Ads & IAP Setup.
IAPManager has one product, NoAds, with the ProductKeyType enum value. The UI No Ads Pop Up page buys it with IAPButton. See Ads & IAP Setup.
The reward system of the module is used by Reward No Ads. The reward map is generated into MD_GeneratedRewardsMap.cs.
LoadingGraphicsBehavior is the loading screen of the Init scene. It implements ILoadingGraphics.
Modules switch on and off with scripting define symbols. The symbols are managed in Window → Watermelon → Tools → Define Manager.
| Module | Define |
|---|---|
| Advertisement | MODULE_ADS |
| Purchasing | MODULE_IAP |
| Haptic | MODULE_HAPTIC |
The game code uses #if MODULE_ADS and #if MODULE_IAP where a module is optional, for example in the settings buttons.
The Advertisement module has optional integrations with the Analytics (MODULE_ANALYTICS) and Remote Config (MODULE_REMOTE_CONFIG) modules. These two modules are not part of the template. The integration code compiles when you install them.
Additional Watermelon modules can be installed into Assets/Project Files/Modules. Add the module init module to Project Init Settings after the modules that it depends on. See Initialization Flow.