Exemplo n.º 1
0
    void replay()
    {
        GameObject box = boxes[actualVertex];

        vertexScript = (NodeGeneration)box.GetComponent(typeof(NodeGeneration));
        vertexScript.visit(id, true);
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     NodeGenerationScript = NodeGeneratorObject.GetComponent<NodeGeneration>();
     RangeCircleScript = RangeCircleObject.GetComponent<RangeCircle>();
     PlayerScript = PlayerObject.GetComponent<Player>();
     ScoreCounterScript = ScoreCounterObject.GetComponent<ScoreCounter>();
     RestartButtonScript = RestartButtonObject.GetComponent<RestartButton>();
     NeuronLineScript = NeuronLineObject.GetComponent<NeuronLine>();
 }
Exemplo n.º 3
0
 public void restart()
 {
     for (int i = 0; i < 26; i++)
     {
         visited[i]   = false;
         vertexScript = (NodeGeneration)boxes[i].GetComponent(typeof(NodeGeneration));
         vertexScript.quitPlayer(id);
     }
     goToVertex(initialVertex, false);
 }
Exemplo n.º 4
0
    public void goToVertex(int vertex, bool init = true)
    {
        GameObject box = boxes[vertex];

        transform.position = box.transform.position;
        transform.Translate(Vector3.back * 0.5f);
        vertexScript = (NodeGeneration)box.GetComponent(typeof(NodeGeneration));
        vertexScript.visit(id, init);
        visited[vertex] = true;
        actualVertex    = vertex;
    }