| | 1 | | using DCL; |
| | 2 | | using UnityEngine; |
| | 3 | |
|
| | 4 | | public class HideAvatarsModifier : AvatarModifier |
| | 5 | | { |
| | 6 | | private const string HIDE_AVATARS_MODIFIER = "HIDE_AVATARS_MODIFIER"; |
| | 7 | |
|
| | 8 | | public override void ApplyModifier(GameObject avatar) |
| | 9 | | { |
| 0 | 10 | | AvatarVisibility avatarVisibility = avatar.GetComponent<AvatarVisibility>(); |
| 0 | 11 | | if (avatarVisibility != null) |
| | 12 | | { |
| 0 | 13 | | avatarVisibility.SetVisibility(HIDE_AVATARS_MODIFIER, false); |
| | 14 | | } |
| 0 | 15 | | } |
| | 16 | |
|
| | 17 | | public override void RemoveModifier(GameObject avatar) |
| | 18 | | { |
| 0 | 19 | | AvatarVisibility avatarVisibility = avatar.GetComponent<AvatarVisibility>(); |
| 0 | 20 | | if (avatarVisibility != null) |
| | 21 | | { |
| 0 | 22 | | avatarVisibility.SetVisibility(HIDE_AVATARS_MODIFIER, true); |
| | 23 | | } |
| 0 | 24 | | } |
| | 25 | | } |