您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

23 行
801 B

using Unity.Netcode;
using UnityEngine;
namespace Unity.Multiplayer.Samples.BossRoom
{
/// <summary>
/// MonoBehaviour containing only one NetworkVariable of type LifeState which represents this object's life state.
/// </summary>
public class NetworkLifeState : NetworkBehaviour
{
[SerializeField]
NetworkVariable<LifeState> m_LifeState = new NetworkVariable<LifeState>(BossRoom.LifeState.Alive);
public NetworkVariable<LifeState> LifeState => m_LifeState;
#if UNITY_EDITOR || DEVELOPMENT_BUILD
/// <summary>
/// Indicates whether this character is in "god mode" (cannot be damaged).
/// </summary>
public NetworkVariable<bool> IsGodMode { get; } = new NetworkVariable<bool>(false);
#endif
}
}