コード例 #1
0
    public void Register(params SerializableReadWrite[] srws)
    {
        Debug.LogWarning($"TransmissionBase {gameObject.name} Register:{srws.Length} SerializableReadWrite");

        bool stateOn  = false;
        bool serialOn = false;

        foreach (var srw in srws)
        {
            switch (srw.syncType)
            {
            case SyncHelperType.RoomState:
            case SyncHelperType.PlayerState:
                statHelper.Register(srw);
                stateOn = true;
                break;

            case SyncHelperType.Serializable:
                seriHelper.Register(srw);
                serialOn = true;
                break;

            default:
                break;
            }
        }

        statHelper.enabled = stateOn;
        seriHelper.enabled = serialOn;
    }