public packet(SpriteBatch initSB, Texture2D initTexture, Node nodeA, Node nodeB) { source = nodeA; destination = nodeB; position = nodeA.getPosition(); sb = initSB; pTexture = initTexture; Label = ""; }
public packet(SpriteBatch initSB, Texture2D initTexture, Node nodeA, Node nodeB,string newLabel, SpriteFont fnt) { source = nodeA; destination = nodeB; position = nodeA.getPosition(); sb = initSB; pTexture = initTexture; Label = newLabel; myFnt = fnt; }
public void addNeighbour(Node newNeighbour) { nS newN=new nS(); newN.neighbor = newNeighbour; newN.timer = 1; neighboursNodes.Add(newN); PrimitiveLine tempLine = new PrimitiveLine(gd); /* if (getPosition().X == newNeighbour.getPosition().X) { tempLine.AddVector(getPosition() + new Vector2(5, 0)); tempLine.AddVector(newNeighbour.getPosition()); tempLine.AddVector(getPosition() + new Vector2(-5, 0)); tempLine.AddVector(newNeighbour.getPosition()); } else { tempLine.AddVector(getPosition()+new Vector2(0,5)); tempLine.AddVector(newNeighbour.getPosition()); tempLine.AddVector(getPosition() + new Vector2(0, -5)); tempLine.AddVector(newNeighbour.getPosition()); }*/ //Simple line tempLine.AddVector(getPosition()); tempLine.AddVector(newNeighbour.getPosition()); neighbours.Add(tempLine); }