2026-06-25 09:21:54 +07:00
|
|
|
|
2026-04-11 18:13:40 +07:00
|
|
|
using Fusion;
|
2026-04-29 13:10:00 +07:00
|
|
|
using UnityEngine;
|
2026-04-11 18:13:40 +07:00
|
|
|
|
2026-04-29 13:10:00 +07:00
|
|
|
namespace OnlyScove.Scripts
|
2026-04-11 18:13:40 +07:00
|
|
|
{
|
2026-04-29 13:10:00 +07:00
|
|
|
public struct PlayerInputData : INetworkInput
|
|
|
|
|
{
|
2026-06-25 10:18:31 +07:00
|
|
|
// Di chuyển (thường là Vector2 cho X/Y hoặc WASD)
|
|
|
|
|
public Vector2 Direction;
|
|
|
|
|
|
|
|
|
|
// Trạng thái chạy nhanh
|
|
|
|
|
public NetworkBool sprint;
|
|
|
|
|
|
|
|
|
|
// Trạng thái nhảy
|
|
|
|
|
public NetworkBool jump;
|
|
|
|
|
|
|
|
|
|
// Góc quay của Camera/Nhân vật (Dùng Quaternion hoặc Vector3 tùy thuộc vào PlanarRotation của bạn)
|
|
|
|
|
public Quaternion rot;
|
|
|
|
|
|
|
|
|
|
// Vector di chuyển đã qua xử lý (UCC CharacterLocomotion.InputVector)
|
|
|
|
|
public Vector2 InputVector;
|
|
|
|
|
|
|
|
|
|
// Vector di chuyển thô (UCC UltimateCharacterLocomotion.RawInputVector)
|
|
|
|
|
public Vector2 RawInputVector;
|
|
|
|
|
|
|
|
|
|
// Độ lệch xoay của nhân vật (UCC CharacterLocomotion.DeltaRotation)
|
|
|
|
|
public Vector3 DeltaRotation;
|
|
|
|
|
|
|
|
|
|
// Trạng thái ngồi (UCC HeightChange ability)
|
|
|
|
|
public NetworkBool crouch;
|
|
|
|
|
|
|
|
|
|
// Trạng thái ngắm bắn (UCC Aim ability)
|
|
|
|
|
public NetworkBool aim;
|
|
|
|
|
|
|
|
|
|
// Trạng thái sử dụng item/tấn công (UCC Use ability)
|
|
|
|
|
public NetworkBool use;
|
|
|
|
|
|
|
|
|
|
// Trạng thái thay đạn (UCC Reload ability)
|
|
|
|
|
public NetworkBool reload;
|
|
|
|
|
|
|
|
|
|
// Góc Pitch của nguồn nhìn (UCC ILookSource.Pitch)
|
|
|
|
|
public float LookPitch;
|
|
|
|
|
|
|
|
|
|
// Hướng nhìn của nhân vật (UCC ILookSource.LookDirection)
|
|
|
|
|
public Vector3 LookDirection;
|
2026-04-29 13:10:00 +07:00
|
|
|
}
|
|
|
|
|
}
|