fgm24/Assets/Scripts/Player/Other/MoveData.cs

23 lines
568 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using Unity.Netcode;
using Unity.VisualScripting.YamlDotNet.Core.Tokens;
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;
}