예제 #1
0
파일: packet.cs 프로젝트: karios/Irida-IVU
 public packet(SpriteBatch initSB, Texture2D initTexture, Node nodeA, Node nodeB)
 {
     source = nodeA;
     destination = nodeB;
     position = nodeA.getPosition();
     sb = initSB;
     pTexture = initTexture;
     Label = "";
 }
예제 #2
0
파일: packet.cs 프로젝트: karios/Irida-IVU
 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;
 }
예제 #3
0
파일: Node.cs 프로젝트: karios/Irida-IVU
        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);
        }