コード例 #1
0
 private void OnFirstPersonEnabledChanged(bool firstPersonEnabled)
 {
     if (_currentSpawnedPlayerAvatar == null)
     {
         return;
     }
     AvatarLayers.SetChildrenToLayer(_currentSpawnedPlayerAvatar.GameObject,
                                     firstPersonEnabled ? 0 : AvatarLayers.OnlyInThirdPerson);
 }
コード例 #2
0
 private void OnFirstPersonEnabledChanged(bool firstPersonEnabled)
 {
     if (_currentSpawnedPlayerAvatar == null)
     {
         return;
     }
     AvatarLayers.SetChildrenToLayer(_currentSpawnedPlayerAvatar.GameObject,
                                     firstPersonEnabled ? 0 : AvatarLayers.OnlyInThirdPerson);
     foreach (var ex in _currentSpawnedPlayerAvatar.GameObject.GetComponentsInChildren <AvatarScriptPack.FirstPersonExclusion>())
     {
         ex.OnFirstPersonEnabledChanged(firstPersonEnabled);
     }
 }