Skip to main content

ServerAchievementEvent

A class in Root.Township, the global namespace.

Fires a player event on the server when a given achievement is completed by a player.

Constructors​

MemberWhat it is
ServerAchievementEvent()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private PlayerEvent onCompleteEvent invoked with the player who completed it.
private GameAchievement targetAchievementThe achievement to watch.

Methods​

3 private and internal methods
MemberWhat it is
private void CompletedAchievement(IPlayer player, GameAchievement achievement)Server: invokes onComplete with the player.
private void OnDestroy()Unhooks from the achievement.
private void Start()Hooks the achievement's CompletedByPlayer event.