You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
889 B
C#

using System;
using Unity.Netcode;
using UnityEngine;
namespace Unity.BossRoom.Gameplay.GameplayObjects
{
public enum LifeState
{
Alive,
Fainted,
Dead,
}
/// <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>(GameplayObjects.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
}
}