コード例 #1
0
        // Update is called once per frame
        void Update()
        {
            if (!Application.isPlaying)
            {
                if (_voxFile != null && _voxFile.GetHashCode() != _hashcode)
                {
//					Debug.Log (_voxFile.GetHashCode ());
                    _hashcode = _voxFile.GetHashCode();
                    this.readVoxFile(_voxFile);
                }
            }
        }
コード例 #2
0
        public T GetConfigFromJson <T>(TextAsset textAsset)
        {
            int    key = textAsset.GetHashCode();
            object obj = null;

            if (_cache.TryGet(key, out obj))
            {
            }
            else
            {
                obj = Tools.Json2Obj <T>(textAsset.text);
                _cache.Set(key, obj);
            }
            return((T)obj);
        }
コード例 #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (id_ != null)
            {
                hash ^= Id.GetHashCode();
            }
            if (name_ != null)
            {
                hash ^= Name.GetHashCode();
            }
            if (Type != global::Google.Ads.GoogleAds.V4.Enums.AssetTypeEnum.Types.AssetType.Unspecified)
            {
                hash ^= Type.GetHashCode();
            }
            if (assetDataCase_ == AssetDataOneofCase.YoutubeVideoAsset)
            {
                hash ^= YoutubeVideoAsset.GetHashCode();
            }
            if (assetDataCase_ == AssetDataOneofCase.MediaBundleAsset)
            {
                hash ^= MediaBundleAsset.GetHashCode();
            }
            if (assetDataCase_ == AssetDataOneofCase.ImageAsset)
            {
                hash ^= ImageAsset.GetHashCode();
            }
            if (assetDataCase_ == AssetDataOneofCase.TextAsset)
            {
                hash ^= TextAsset.GetHashCode();
            }
            if (assetDataCase_ == AssetDataOneofCase.BookOnGoogleAsset)
            {
                hash ^= BookOnGoogleAsset.GetHashCode();
            }
            hash ^= (int)assetDataCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #4
0
ファイル: Asset.cs プロジェクト: wfansh/google-ads-dotnet
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (id_ != null)
            {
                hash ^= Id.GetHashCode();
            }
            if (name_ != null)
            {
                hash ^= Name.GetHashCode();
            }
            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (assetDataCase_ == AssetDataOneofCase.YoutubeVideoAsset)
            {
                hash ^= YoutubeVideoAsset.GetHashCode();
            }
            if (assetDataCase_ == AssetDataOneofCase.MediaBundleAsset)
            {
                hash ^= MediaBundleAsset.GetHashCode();
            }
            if (assetDataCase_ == AssetDataOneofCase.ImageAsset)
            {
                hash ^= ImageAsset.GetHashCode();
            }
            if (assetDataCase_ == AssetDataOneofCase.TextAsset)
            {
                hash ^= TextAsset.GetHashCode();
            }
            hash ^= (int)assetDataCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #5
0
 public override int GetHashCode()
 {
     return(ReferenceEquals(Target, null) ? 0 : Target.GetHashCode());
 }