当前位置: 首页>>代码示例>>C#>>正文


C# ByteBuffer.readInt方法代码示例

本文整理汇总了C#中ByteBuffer.readInt方法的典型用法代码示例。如果您正苦于以下问题:C# ByteBuffer.readInt方法的具体用法?C# ByteBuffer.readInt怎么用?C# ByteBuffer.readInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ByteBuffer的用法示例。


在下文中一共展示了ByteBuffer.readInt方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnData

	//--------------------------------------
	//  PUBLIC METHODS
	//--------------------------------------
	
	//--------------------------------------
	//  GET/SET
	//--------------------------------------
	
	//--------------------------------------
	//  EVENTS
	//--------------------------------------

	private  void OnData(GameCenterDataPackage package) {




		ByteBuffer b = new ByteBuffer (package.buffer);

		int pId = b.readInt();

		switch(pId) {
		case 1:
			Debug.Log("Sphere pack");
			Vector3 pos = new Vector3 (0, 0, 1);
			pos.x = b.readFloat ();
			pos.y = b.readFloat ();
			
			
			
			PTPGameController.instance.createRedSphere (pos);
			break;
		default:
			Debug.Log("Got pack wit id: " + pId);
			break;
		}



	

	}
开发者ID:cupsster,项目名称:gtmanager,代码行数:42,代码来源:ClickManager.cs

示例2: bytesRead

 public override void bytesRead(ByteBuffer data)
 {
     base.bytesRead(data);
     if (this.isTag(base._tag))
     {
         this._value = data.readInt();
     }
 }
开发者ID:hebbaixue99,项目名称:XJDemoServer,代码行数:8,代码来源:ErlInt.cs

示例3: bytesRead

 public override void bytesRead(ByteBuffer data)
 {
     base.bytesRead(data);
     if (this.isTag(base._tag))
     {
         int num = data.readInt();
         this._value = new ByteBuffer();
         this._value.writeBytes(data, 0, (uint) num);
         this._value.position = 0;
         data.position += num;
     }
     ByteBuffer buffer2 = new ByteBuffer(ZIPUtil.Decompress(this._value.toArray()));
     buffer2.readByte();
     this._erlValue = ByteKit.complexAnalyse(buffer2);
 }
开发者ID:hebbaixue99,项目名称:XJDemoServer,代码行数:15,代码来源:ErlByteArray.cs

示例4: HandleActionDataReceived

	//--------------------------------------
	//  PUBLIC METHODS
	//--------------------------------------
	
	//--------------------------------------
	//  GET/SET
	//--------------------------------------
	
	//--------------------------------------
	//  EVENTS
	//--------------------------------------


	void HandleActionDataReceived (GK_Player player, byte[] data) {
		ByteBuffer b = new ByteBuffer (data);
		
		int pId = b.readInt();
		
		switch(pId) {
		case 1:
			Debug.Log("Sphere pack");
			Vector3 pos = new Vector3 (0, 0, 1);
			pos.x = b.readFloat ();
			pos.y = b.readFloat ();
			
			
			
			PTPGameController.instance.createRedSphere (pos);
			break;
		default:
			Debug.Log("Got pack wit id: " + pId);
			break;
		}
	}
开发者ID:Thanhvx-dth,项目名称:SexyPuzzle,代码行数:34,代码来源:ClickManager.cs

示例5: bytesRead

 public override void bytesRead(ByteBuffer data)
 {
     base.bytesRead(data);
     if (base._tag == TAG[0])
     {
         int num = data.readUnsignedByte();
         this._value = new ErlType[num];
         for (int i = 0; i < num; i++)
         {
             this._value[i] = ByteKit.natureAnalyse(data);
         }
     }
     else if (base._tag == TAG[1])
     {
         int num3 = data.readInt();
         this._value = new ErlType[num3];
         for (int j = 0; j < num3; j++)
         {
             this._value[j] = ByteKit.natureAnalyse(data);
         }
     }
 }
开发者ID:hebbaixue99,项目名称:XJDemoServer,代码行数:22,代码来源:ErlArray.cs


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