Feel  3.16
The best way to improve your game's feel and make it extra juicy
MoreMountains.Tools.MMAchievementDisplayer Class Reference

A class used to display the achievements on screen. The AchievementDisplayItems will be parented to it, so it's better if it has a LayoutGroup (Vertical or Horizontal) too. More...

Inheritance diagram for MoreMountains.Tools.MMAchievementDisplayer:
MoreMountains.Tools.MMEventListener< MMAchievementUnlockedEvent >

Public Member Functions

virtual IEnumerator DisplayAchievement (MMAchievement achievement)
 Instantiates an achievement display prefab and shows it for the specified duration More...
 
virtual void OnMMEvent (MMAchievementUnlockedEvent achievementUnlockedEvent)
 When an achievement is unlocked, we display it More...
 
- Public Member Functions inherited from MoreMountains.Tools.MMEventListener< MMAchievementUnlockedEvent >
void OnMMEvent (T eventType)
 

Public Attributes

MMAchievementDisplayItem AchievementDisplayPrefab
 the prefab to use to display achievements More...
 
float AchievementDisplayDuration = 5f
 the duration the achievement will remain on screen for when unlocked More...
 
float AchievementFadeDuration = 0.2f
 the fade in/out speed More...
 

Protected Member Functions

virtual void OnEnable ()
 On enable, we start listening for unlocked achievements More...
 
virtual void OnDisable ()
 On disable, we stop listening for unlocked achievements More...
 

Protected Attributes

WaitForSeconds _achievementFadeOutWFS
 

Detailed Description

A class used to display the achievements on screen. The AchievementDisplayItems will be parented to it, so it's better if it has a LayoutGroup (Vertical or Horizontal) too.

Member Function Documentation

◆ DisplayAchievement()

virtual IEnumerator MoreMountains.Tools.MMAchievementDisplayer.DisplayAchievement ( MMAchievement  achievement)
virtual

Instantiates an achievement display prefab and shows it for the specified duration

Returns
The achievement.
Parameters
achievementAchievement.

◆ OnDisable()

virtual void MoreMountains.Tools.MMAchievementDisplayer.OnDisable ( )
protectedvirtual

On disable, we stop listening for unlocked achievements

◆ OnEnable()

virtual void MoreMountains.Tools.MMAchievementDisplayer.OnEnable ( )
protectedvirtual

On enable, we start listening for unlocked achievements

◆ OnMMEvent()

virtual void MoreMountains.Tools.MMAchievementDisplayer.OnMMEvent ( MMAchievementUnlockedEvent  achievementUnlockedEvent)
virtual

When an achievement is unlocked, we display it

Parameters
achievementUnlockedEventAchievement unlocked event.

Member Data Documentation

◆ _achievementFadeOutWFS

WaitForSeconds MoreMountains.Tools.MMAchievementDisplayer._achievementFadeOutWFS
protected

◆ AchievementDisplayDuration

float MoreMountains.Tools.MMAchievementDisplayer.AchievementDisplayDuration = 5f

the duration the achievement will remain on screen for when unlocked

◆ AchievementDisplayPrefab

MMAchievementDisplayItem MoreMountains.Tools.MMAchievementDisplayer.AchievementDisplayPrefab

the prefab to use to display achievements

◆ AchievementFadeDuration

float MoreMountains.Tools.MMAchievementDisplayer.AchievementFadeDuration = 0.2f

the fade in/out speed


The documentation for this class was generated from the following file: