コード例 #1
0
ファイル: MapDrawer.cs プロジェクト: fengqk/Art
	public MapBrush(string name, GameObject parent, GetOffsetDelegate getOffset, HideFlags flag)
	{
		root = new GameObject(name);
		root.transform.parent = parent.transform;
		this.parent = root;
		this.GetOffset = getOffset;
		//this.mat = new Material(Shader.Find("Transparent/Diffuse"));
		Material mat = new Material("Shader \"Alpha Additive\" {" +
			"Properties { _Color (\"Main Color\", Color) = (1,1,1,0) }" +
			"SubShader {" +
			"	Tags { \"Queue\" = \"Transparent +2001\" }" +
			"	Pass {" +
				"  Blend  One OneMinusSrcAlpha " +// "ZTest Off" +
				"    ZWrite Off Cull Off Fog { Mode Off } " +
			"		Material { Diffuse [_Color] Ambient [_Color] }" +
			"		Lighting On" +
			"		SetTexture [_Dummy] { combine primary double, primary }" +
			"	}" +
			"}" +
			"}");
		this.mat = mat;
		this.mat.color = new Color(1, 1, 1, 1f);

		subObjs = new List<GameObject>();
		size = 1;

		IsShowing = false;
		enabledCount = 1;

		SetBrushSize(size, flag);

	}
コード例 #2
0
ファイル: PartialStream.cs プロジェクト: indilo53/gta-toolkit
 public PartialStream(
     Stream baseStream,
     GetOffsetDelegate getOffsetDelegate,
     GetLengthDelegate getLengthDelegate,
     SetLengthDelegate setLengthDelegate = null)
 {
     this.baseStream        = baseStream;
     this.getOffsetDelegate = getOffsetDelegate;
     this.getLengthDelegate = getLengthDelegate;
     this.setLengthDelegate = setLengthDelegate;
 }
コード例 #3
0
ファイル: PartialStream.cs プロジェクト: isti37/gta-toolkit
 public PartialStream(
     Stream baseStream,
     GetOffsetDelegate getOffsetDelegate,
     GetLengthDelegate getLengthDelegate,
     SetLengthDelegate setLengthDelegate = null)
 {
     this.baseStream = baseStream;
     this.getOffsetDelegate = getOffsetDelegate;
     this.getLengthDelegate = getLengthDelegate;
     this.setLengthDelegate = setLengthDelegate;
 }