/// <summary> /// generic signature to be called in getData of syncables /// meant to pass specific balancing data on object generation /// DO NOT MANAGE idcard /// </summary> static public NwkSyncableData createData(this iNwkPack instance, float syncTime, short PID = -1) { NwkSyncableData data = new NwkSyncableData(instance, syncTime); data.idCard.syncPID = PID; return(data); }
float _sendFrequency; // time interval to send pack to server public NwkSyncableData(iNwkPack parent, float freq) { idCard = new NwkSyncableId(); idCard.syncIID = NwkClient.generateUniqId(); //this is overritten in syncer first message when it's not local syncNwkClientUID = NwkClient.nwkUid; handle = parent; _sendFrequency = freq; resetState(); //GameObject.FindObjectOfType<NwkSyncer>().sub(parent); }