您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
30 行
1.1 KiB
30 行
1.1 KiB
using Unity.Netcode;
|
|
using UnityEngine;
|
|
|
|
namespace Unity.Multiplayer.Samples.BossRoom
|
|
{
|
|
/// <summary>
|
|
/// This is a temporary abstraction for different shared network states that all handle movement. This
|
|
/// way a single client-side component can be used to update the local client transform. This can be dispensed with
|
|
/// once Netcode for GameObjects handles client-side movement internally.
|
|
/// </summary>
|
|
public interface INetMovement
|
|
{
|
|
/// <summary>
|
|
/// The current transform position of this entity.
|
|
/// </summary>
|
|
public NetworkVariable<Vector3> NetworkPosition { get; }
|
|
|
|
/// <summary>
|
|
/// The networked rotation of this entity. This reflects the authorative rotation on the server.
|
|
/// </summary>
|
|
public NetworkVariable<float> NetworkRotationY { get; }
|
|
|
|
/// <summary>
|
|
/// The current speed of this entity in m/s.
|
|
/// </summary>
|
|
public NetworkVariable<float> NetworkMovementSpeed { get; }
|
|
|
|
public void InitNetworkPositionAndRotationY(Vector3 initPosition, float initRotationY);
|
|
}
|
|
}
|