• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# UpdateFlags类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中UpdateFlags的典型用法代码示例。如果您正苦于以下问题:C# UpdateFlags类的具体用法?C# UpdateFlags怎么用?C# UpdateFlags使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UpdateFlags类属于命名空间,在下文中一共展示了UpdateFlags类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: MongoUpdateOptions

 /// <summary>
 /// Initializes a new instance of the MongoUpdateOptions class.
 /// </summary>
 /// <param name="collection">The collection from which to get default settings for the options.</param>
 public MongoUpdateOptions(
     MongoCollection collection
 ) {
     this.checkElementNames = true;
     this.flags = UpdateFlags.None;
     this.safeMode = collection.Settings.SafeMode;
 }
开发者ID:snedzad,项目名称:mongo-csharp-driver,代码行数:11,代码来源:MongoUpdateOptions.cs


示例2: MovementBlock

		public MovementBlock(UpdateBlock update)
		{
			Update = update;
			UpdateFlags = (UpdateFlags)update.ReadUShort();
			ObjectTypeId = update.ObjectType;

			this.Parse();
		}
开发者ID:pallmall,项目名称:WCell,代码行数:8,代码来源:MovementBlock.cs


示例3: MongoUpdateMessage

 // constructors
 internal MongoUpdateMessage(BsonBinaryWriterSettings writerSettings, string collectionFullName, bool checkUpdateDocument, UpdateFlags flags, IMongoQuery query, IMongoUpdate update)
     : base(MessageOpcode.Update, null, writerSettings)
 {
     this.collectionFullName = collectionFullName;
     this.checkUpdateDocument = checkUpdateDocument;
     this.flags = flags;
     this.query = query;
     this.update = update;
 }
开发者ID:kamaradclimber,项目名称:mongo-csharp-driver,代码行数:10,代码来源:MongoUpdateMessage.cs


示例4: BeginProcessing

        protected override void BeginProcessing()
        {
            if (_Update == null) throw new PSArgumentException(_UpdateError ?? TextParameterUpdate); //_131102_111738

            if (Add)
                _Flags |= UpdateFlags.Upsert;

            if (All)
                _Flags |= UpdateFlags.Multi;
        }
开发者ID:jajp777,项目名称:Mdbc,代码行数:10,代码来源:UpdateDataCommand.cs


示例5: MongoUpdateMessage

 internal MongoUpdateMessage(
     MongoConnection connection,
     string collectionFullName,
     UpdateFlags flags,
     IMongoQuery query,
     IMongoUpdate update
 ) :
     base(connection, MessageOpcode.Update) {
     this.collectionFullName = collectionFullName;
     this.flags = flags;
     this.query = query;
     this.update = update;
 }
开发者ID:oskysal,项目名称:mongo-csharp-driver,代码行数:13,代码来源:MongoUpdateMessage.cs


示例6: ResetValues

 public void ResetValues()
 {
     Radius = 0.6f;
     Height = 2.0f;
     MaxAcceleration = 8.0f;
     MaxSpeed = 3.5f;
     CollisionQueryRange = 0.6f*12.0f;
     PathOptimizationRange = 0.6f*30.0f;
     UpdateFlags = 0;
     ObstacleAvoidanceType = 3;
     SeparationWeight = 2.0f;
     WaitForUpdate = 0.0f;
 }
开发者ID:zukeru,项目名称:ageofasura,代码行数:13,代码来源:DetourActor.cs


示例7: Awake

 private void Awake()
 {
     this.UpgradeData();
     if (this.data.font != null)
     {
         this._fontInst = this.data.font.inst;
     }
     this.updateFlags = UpdateFlags.UpdateBuffers;
     if (this.data.font != null)
     {
         this.Init();
         this.UpdateMaterial();
     }
     this.updateFlags = UpdateFlags.UpdateNone;
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:15,代码来源:tk2dTextMesh.cs


示例8: MongoUpdateMessage

 // constructors
 internal MongoUpdateMessage(
     BsonBinaryWriterSettings writerSettings,
     string collectionFullName,
     bool checkUpdateDocument,
     UpdateFlags flags,
     int maxDocumentSize,
     IMongoQuery query,
     IMongoUpdate update)
     : base(MessageOpcode.Update, writerSettings)
 {
     _collectionFullName = collectionFullName;
     _checkUpdateDocument = checkUpdateDocument;
     _flags = flags;
     _maxDocumentSize = maxDocumentSize;
     _query = query;
     _update = update;
 }
开发者ID:Khosrow-Azizi,项目名称:MasterExperimentV2,代码行数:18,代码来源:MongoUpdateMessage.cs


示例9: UpdateOperation

 public UpdateOperation(
     string databaseName,
     string collectionName,
     BsonBinaryReaderSettings readerSettings,
     BsonBinaryWriterSettings writerSettings,
     WriteConcern writeConcern,
     IMongoQuery query,
     IMongoUpdate update,
     UpdateFlags flags,
     bool checkElementNames)
     : base(databaseName, collectionName, readerSettings, writerSettings, writeConcern)
 {
     _query = query;
     _update = update;
     _flags = flags;
     _checkElementNames = checkElementNames;
 }
开发者ID:einaregilsson,项目名称:mongo-csharp-driver,代码行数:17,代码来源:UpdateOperation.cs


示例10: Commit

    /// <summary>
    /// Call commit after changing properties to commit the changes.
    /// This is deffered to a commit call as more than one operation may require rebuilding the buffers, eg. scaling and changing text.
    /// This will be wasteful if performed multiple times.
    /// </summary>
    public void Commit()
    {
        // make sure fonts dictionary is initialized properly before proceeding
        _font.InitDictionary();

        // Can come in here without anything initalized when
        // instantiated in code
        if ((updateFlags & UpdateFlags.UpdateBuffers) != 0 || mesh == null)
        {
            Init();
        }
        else
        {
            if ((updateFlags & UpdateFlags.UpdateText) != 0)
            {
                int target = FillTextData();
                for (int i = target; i < _maxChars; ++i)
                {
                    // was/is unnecessary to fill anything else
                    vertices[i * 4 + 0] = vertices[i * 4 + 1] = vertices[i * 4 + 2] = vertices[i * 4 + 3] = Vector3.zero;
                }

                mesh.vertices = vertices;
                mesh.uv = uvs;
                if (font.textureGradients)
                {
                    mesh.uv1 = uv2;
                }

                // comment this in for game if it becomes a problem
        #if UNITY_EDITOR
                mesh.RecalculateBounds();
        #endif
            }

            if ((updateFlags & UpdateFlags.UpdateColors) != 0)
            {
                Color topColor = _color;
                Color bottomColor = _useGradient ? _color2 : _color;

                for (int i = 0; i < colors.Length; i += 4)
                {
                    colors[i + 0] = colors[i + 1] = topColor;
                    colors[i + 2] = colors[i + 3] = bottomColor;
                }
                mesh.colors = colors;
            }
        }

        updateFlags = UpdateFlags.UpdateNone;
    }
开发者ID:stubuchbinder,项目名称:weave,代码行数:56,代码来源:tk2dTextMesh.cs


示例11: Init

 public void Init(bool force)
 {
     if (force)
     {
         updateFlags |= UpdateFlags.UpdateBuffers;
     }
     Init();
 }
开发者ID:stubuchbinder,项目名称:weave,代码行数:8,代码来源:tk2dTextMesh.cs


示例12: Update

 public WriteConcernResult Update(IMongoQuery query, IMongoUpdate update, UpdateFlags flags, WriteConcern writeConcern, bool needResult)
 {
     return _this.Update(query, update, flags, writeConcern);
 }
开发者ID:jajp777,项目名称:Mdbc,代码行数:4,代码来源:CollectionHost.cs


示例13: MongoUpdateOptions

 // constructors
 /// <summary>
 /// Initializes a new instance of the MongoUpdateOptions class.
 /// </summary>
 public MongoUpdateOptions()
 {
     _checkElementNames = true;
     _flags = UpdateFlags.None;
 }
开发者ID:Bogdan0x400,项目名称:mongo-csharp-driver,代码行数:9,代码来源:MongoUpdateOptions.cs


示例14: MongoUpdateOptions

 // constructors
 /// <summary>
 /// Initializes a new instance of the MongoUpdateOptions class.
 /// </summary>
 public MongoUpdateOptions()
 {
     this.checkElementNames = true;
     this.flags = UpdateFlags.None;
 }
开发者ID:kamaradclimber,项目名称:mongo-csharp-driver,代码行数:9,代码来源:MongoUpdateOptions.cs


示例15: WriteTypeSpecificMovementUpdate

		protected override void WriteTypeSpecificMovementUpdate(PrimitiveWriter writer, UpdateFieldFlags relation, UpdateFlags updateFlags)
		{
			base.WriteTypeSpecificMovementUpdate(writer, relation, updateFlags);
			writer.Write(m_entry.VehicleId);
			writer.Write(m_entry.VehicleAimAdjustment);
		}
开发者ID:NVN,项目名称:WCell,代码行数:6,代码来源:Vehicle.cs


示例16: Awake

    // Use this for initialization
    void Awake()
    {
        UpgradeData();
        if (data.font != null)
            _fontInst = data.font.inst;

        // force rebuild when awakened, for when the object has been pooled, etc
        // this is probably not the best way to do it
        updateFlags = UpdateFlags.UpdateBuffers;

        if (data.font != null)
        {
            Init();
            UpdateMaterial();
        }
    }
开发者ID:roma60102,项目名称:ProjectDemo,代码行数:17,代码来源:tk2dTextMesh.cs


示例17: SetNeedUpdate

	void SetNeedUpdate(UpdateFlags uf) {
		if (updateFlags == UpdateFlags.UpdateNone) {
			updateFlags |= uf;
			tk2dUpdateManager.QueueCommit(this);
		}
		else {
			// Already queued
			updateFlags |= uf;
		}
	}
开发者ID:dfos1,项目名称:Gladiator-Arena,代码行数:10,代码来源:tk2dTextMesh.cs


示例18: Init

	public void Init()
	{
		if (_fontInst && ((updateFlags & UpdateFlags.UpdateBuffers) != 0 || mesh == null))
		{
			_fontInst.InitDictionary();
			FormatText();

			var geomData = tk2dTextGeomGen.Data( data, _fontInst, _formattedText );

			// volatile data
			int numVertices;
			int numIndices;
			tk2dTextGeomGen.GetTextMeshGeomDesc(out numVertices, out numIndices, geomData);
			vertices = new Vector3[numVertices];
			uvs = new Vector2[numVertices];
			colors = new Color32[numVertices];
			untintedColors = new Color32[numVertices];
			if (_fontInst.textureGradients)
			{
				uv2 = new Vector2[numVertices];
			}
			int[] triangles = new int[numIndices];


			int target = tk2dTextGeomGen.SetTextMeshGeom(vertices, uvs, uv2, untintedColors, 0, geomData);

			if (!_fontInst.isPacked) {
				Color32 topColor = data.color;
				Color32 bottomColor = data.useGradient ? data.color2 : data.color;
				for (int i = 0; i < numVertices; ++i) {
					Color32 c = ((i % 4) < 2) ? topColor : bottomColor;
					byte red = (byte)(((int)untintedColors[i].r * (int)c.r) / 255);
					byte green = (byte)(((int)untintedColors[i].g * (int)c.g) / 255);
					byte blue = (byte)(((int)untintedColors[i].b * (int)c.b) / 255);
					byte alpha = (byte)(((int)untintedColors[i].a * (int)c.a) / 255);
					if (_fontInst.premultipliedAlpha) {
						red = (byte)(((int)red * (int)alpha) / 255);
						green = (byte)(((int)green * (int)alpha) / 255);
						blue = (byte)(((int)blue * (int)alpha) / 255);
					}
					colors[i] = new Color32(red, green, blue, alpha);
				}
			}
			else {
				colors = untintedColors;
			}

			tk2dTextGeomGen.SetTextMeshIndices(triangles, 0, 0, geomData, target);
			


			if (mesh == null)
			{
				if (meshFilter == null)
					meshFilter = GetComponent<MeshFilter>();
				
				mesh = new Mesh();
				mesh.hideFlags = HideFlags.DontSave;
				meshFilter.mesh = mesh;
			}
			else
			{
				mesh.Clear();
			}
			mesh.vertices = vertices;
			mesh.uv = uvs;
			if (font.textureGradients)
			{
				mesh.uv2 = uv2;
			}
			mesh.triangles = triangles;
			mesh.colors32 = colors;
			mesh.RecalculateBounds();
			mesh.bounds = tk2dBaseSprite.AdjustedMeshBounds( mesh.bounds, data.renderLayer );

			updateFlags = UpdateFlags.UpdateNone;
		}
	}
开发者ID:dfos1,项目名称:Gladiator-Arena,代码行数:78,代码来源:tk2dTextMesh.cs


示例19: Init

    public void Init()
    {
        if (_font && (updateFlags & UpdateFlags.UpdateBuffers) != 0)
        {
            MeshFilter meshFilter = GetComponent<MeshFilter>();
            Mesh newMesh = new Mesh();

            Color topColor = _color;
            Color bottomColor = _useGradient?_color2:_color;

            // volatile data
            vertices = new Vector3[_maxChars * 4];
            uvs = new Vector2[_maxChars * 4];
            colors = new Color[_maxChars * 4];
            int[] triangles = new int[_maxChars * 6];

            float offsetX, offsetY;
            CalcAnchor(out offsetX, out offsetY);

            float cursorX = 0.0f;
            float cursorY = 0.0f;
            for (int i = 0; i < _maxChars; ++i)
            {
                if (i < _text.Length)
                {
                    int idx = _text[i];
                    if (idx >= _font.chars.Length) idx = 0; // should be space
                    tk2dFontChar chr = _font.chars[idx];

                    if (idx == '\n')
                    {
                        cursorX = 0.0f;
                        cursorY -= _font.lineHeight * _scale.y;
                        continue;
                    }

                    vertices[i * 4 + 0] = new Vector3(offsetX + cursorX + chr.p0.x * _scale.x, offsetY + cursorY + chr.p0.y * _scale.y, 0);
                    vertices[i * 4 + 1] = new Vector3(offsetX + cursorX + chr.p1.x * _scale.x, offsetY + cursorY + chr.p0.y * _scale.y, 0);
                    vertices[i * 4 + 2] = new Vector3(offsetX + cursorX + chr.p0.x * _scale.x, offsetY + cursorY + chr.p1.y * _scale.y, 0);
                    vertices[i * 4 + 3] = new Vector3(offsetX + cursorX + chr.p1.x * _scale.x, offsetY + cursorY + chr.p1.y * _scale.y, 0);

                    uvs[i * 4 + 0] = new Vector2(chr.uv0.x, chr.uv0.y);
                    uvs[i * 4 + 1] = new Vector2(chr.uv1.x, chr.uv0.y);
                    uvs[i * 4 + 2] = new Vector2(chr.uv0.x, chr.uv1.y);
                    uvs[i * 4 + 3] = new Vector2(chr.uv1.x, chr.uv1.y);

                    cursorX += chr.advance * _scale.x;
                }
                else
                {
                    vertices[i * 4 + 0] = vertices[i * 4 + 1] = vertices[i * 4 + 2] = vertices[i * 4 + 3] = Vector3.zero;
                    uvs[i * 4 + 0] = uvs[i * 4 + 1] = uvs[i * 4 + 2] = uvs[i * 4 + 3] = Vector2.zero;
                }

                colors[i * 4 + 0] = colors[i * 4 + 1] = topColor;
                colors[i * 4 + 2] = colors[i * 4 + 3] = bottomColor;

                triangles[i * 6 + 0] = i * 4 + 0;
                triangles[i * 6 + 1] = i * 4 + 1;
                triangles[i * 6 + 2] = i * 4 + 3;
                triangles[i * 6 + 3] = i * 4 + 2;
                triangles[i * 6 + 4] = i * 4 + 0;
                triangles[i * 6 + 5] = i * 4 + 3;

                if (_kerning && i < _text.Length - 1)
                {
                    foreach (var k in _font.kerning)
                    {
                        if (k.c0 == _text[i] && k.c1 == _text[i+1])
                        {
                            cursorX += k.amount * _scale.x;
                            break;
                        }
                    }
                }
            }

            newMesh.vertices = vertices;
            newMesh.uv = uvs;
            newMesh.triangles = triangles;
            newMesh.colors = colors;

            newMesh.RecalculateBounds();
            meshFilter.mesh = newMesh;
            mesh = meshFilter.sharedMesh;

            updateFlags = UpdateFlags.UpdateNone;
        }
    }
开发者ID:polyblank2,项目名称:Platformer_Game,代码行数:89,代码来源:tk2dTextMesh.cs


示例20: MongoUpdateOptions

 // constructors
 /// <summary>
 /// Initializes a new instance of the MongoUpdateOptions class.
 /// </summary>
 public MongoUpdateOptions()
 {
     _flags = UpdateFlags.None;
 }
开发者ID:narutoswj,项目名称:mongo-csharp-driver,代码行数:8,代码来源:MongoUpdateOptions.cs



注:本文中的UpdateFlags类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UpdateState类代码示例发布时间:2022-05-24
下一篇:
C# UpdateCommand类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap