|
|
|
@ -6,6 +6,8 @@ namespace Unity.Multiplayer.Samples.BossRoom
|
|
|
|
|
[RequireComponent(typeof(Collider))]
|
|
|
|
|
public class Platform : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public int PlatformID { get; private set; }
|
|
|
|
|
public bool IsOccupied => Occupier != null;
|
|
|
|
|
public ServerCharacter Occupier { get; private set; }
|
|
|
|
|
|
|
|
|
@ -21,6 +23,16 @@ namespace Unity.Multiplayer.Samples.BossRoom
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sets the unique ID for the platform.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">The unique ID to assign.</param>
|
|
|
|
|
public void AssignID(int id)
|
|
|
|
|
{
|
|
|
|
|
PlatformID = id;
|
|
|
|
|
Debug.Log($"Platform {name} assigned ID: {PlatformID}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Marks this platform as occupied by a specific player.
|
|
|
|
|
/// </summary>
|
|
|
|
|