add synced bag to VehicleController

This commit is contained in:
in0finite 2021-11-17 18:54:11 +01:00
parent 204f0be4f5
commit a5d3c657fc

View file

@ -37,12 +37,20 @@ namespace SanAndreasUnity.Behaviours.Vehicles
class WheelSyncList : SyncList<WheelSyncData> { }
WheelSyncList m_net_wheelsData;
private readonly SyncedBag.StringSyncDictionary m_syncDictionary = new SyncedBag.StringSyncDictionary();
public SyncedBag ExtraData { get; }
// is it better to place syncvars in Vehicle class ? - that way, there is no need for hooks
// - or we could assign/read syncvars in Update()
private VehicleController()
{
ExtraData = new SyncedBag(m_syncDictionary);
}
private void Awake()
{
//m_vehicle = GetComponent<Vehicle>();