Пример #1
0
    public void Init(WMG_Bezier_Band_Graph graph)
    {
        this.graph = graph;
//		theGraph.setTextureMaterial(areaShadingRects[i], matToUse);
        bandFillSprite = WMG_Util.createSprite(getTexture(bandFillSpriteGO));
        bandLineSprite = WMG_Util.createSprite(getTexture(bandLineSpriteGO));
//		bandFillSprite = WMG_Util.createAlphaSprite(1024);
//		bandLineSprite = WMG_Util.createAlphaSprite(1024);
//		bandBotLineSprite = WMG_Util.createSprite(getTexture(bandBotLineSpriteGO));
        texSize = bandFillSprite.texture.width;
//		texSize = 1024;
        bandFillColors = new Color[texSize * texSize];
        bandLineColors = new Color[texSize * texSize];
//		bandBotLineColors = new Color[texSize * texSize];
        setTexture(bandFillSpriteGO, bandFillSprite);
        setTexture(bandLineSpriteGO, bandLineSprite);
//		setTexture(bandBotLineSpriteGO, bandBotLineSprite);
        size = Mathf.RoundToInt(Mathf.Sqrt(bandFillColors.Length));
//		size = 1024;
        maxS = size - 1;
//		setTextureMaterial(bandFillSpriteGO, graph.uiGradient);
//		setTextureMaterial(bandLineSpriteGO, graph.uiGradient);
//		bandFillMat = getTextureMaterial(bandFillSpriteGO);
//		bandLineMat = getTextureMaterial(bandLineSpriteGO);
    }
Пример #2
0
 public void Init(WMG_Bezier_Band_Graph graph)
 {
     this.graph     = graph;
     texSize        = graph.textureResolution;
     bandFillSprite = WMG_Util.createSprite(texSize, texSize);
     bandLineSprite = WMG_Util.createSprite(texSize, texSize);
     bandFillColors = new Color[texSize * texSize];
     bandLineColors = new Color[texSize * texSize];
     setTexture(bandFillSpriteGO, bandFillSprite);
     setTexture(bandLineSpriteGO, bandLineSprite);
 }
Пример #3
0
	public void Init(WMG_Bezier_Band_Graph graph) {
		this.graph = graph;
//		theGraph.setTextureMaterial(areaShadingRects[i], matToUse);
		bandFillSprite = WMG_Util.createSprite(getTexture(bandFillSpriteGO));
		bandLineSprite = WMG_Util.createSprite(getTexture(bandLineSpriteGO));
//		bandFillSprite = WMG_Util.createAlphaSprite(1024);
//		bandLineSprite = WMG_Util.createAlphaSprite(1024);
//		bandBotLineSprite = WMG_Util.createSprite(getTexture(bandBotLineSpriteGO));
		texSize = bandFillSprite.texture.width;
//		texSize = 1024;
		bandFillColors = new Color[texSize * texSize];
		bandLineColors = new Color[texSize * texSize];
//		bandBotLineColors = new Color[texSize * texSize];
		setTexture(bandFillSpriteGO, bandFillSprite);
		setTexture(bandLineSpriteGO, bandLineSprite);
//		setTexture(bandBotLineSpriteGO, bandBotLineSprite);
		size = Mathf.RoundToInt(Mathf.Sqrt(bandFillColors.Length));
//		size = 1024;
		maxS = size - 1;
//		setTextureMaterial(bandFillSpriteGO, graph.uiGradient);
//		setTextureMaterial(bandLineSpriteGO, graph.uiGradient);
//		bandFillMat = getTextureMaterial(bandFillSpriteGO);
//		bandLineMat = getTextureMaterial(bandLineSpriteGO);
	}
	public void OnEnable()
	{
		graph = (WMG_Bezier_Band_Graph)target;
		fields = GetProperties(graph);
	}
Пример #5
0
 public void OnEnable()
 {
     graph  = (WMG_Bezier_Band_Graph)target;
     fields = GetProperties(graph);
 }