23 lines
517 B
C#
23 lines
517 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Unity.Netcode;
|
|
using UnityEngine;
|
|
|
|
public struct MoveData : INetworkSerializable
|
|
{
|
|
public Vector2 Movement;
|
|
public Vector2 Look;
|
|
|
|
public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReaderWriter
|
|
{
|
|
serializer.SerializeValue(ref Movement);
|
|
//serializer.SerializeValue(ref Look); // Not used yet
|
|
}
|
|
}
|
|
|
|
public interface IMoveData
|
|
{
|
|
public event Action<MoveData> OnNewMoveData;
|
|
}
|