Ejemplo n.º 1
0
        public void Draw()
        {
            if (start != null)
            {
                start.Draw();
            }
            tex.Apply();

            RoadMapGen.SaveTexToPng("rivers", tex);
            Debug.Log("finished river with " + nodeCount + " node(s), it took " + iterations + " iteration(s), children L/R: " + leftChildren + "/" + rightChildren);
        }
Ejemplo n.º 2
0
        public RMGRiver(RoadMapGen map, float x, float y, int w, int h, int resize, float facing)
        {
            this.resizeFactor = resize;
            this.map          = map;
            this.x            = x * resizeFactor;
            this.y            = y * resizeFactor;
            this.w            = w * resizeFactor;
            this.h            = h * resizeFactor;
            tex = new Texture2D(this.w, this.h, NYDISpriteManager.DEFAULT_TEXTURE_FORMAT, false);

            this.facing   = facing;
            this.minAngle = facing - (Mathf.PI / 2.0f) - (Mathf.Deg2Rad * 10);
            this.maxAngle = facing + (Mathf.PI / 2.0f) + (Mathf.Deg2Rad * 10);
        }