Esempio n. 1
0
 private void nodeCreation()
 {
     if (inCreation)
     {
         if (Input.GetKeyDown(KeyCode.Alpha1))
         {
             LinkedList.createNode(MouseLook.getCamPosition() + MouseLook.getCamForward() * 3, 0);
             TempText.fadeInDec = 0.2f;
             TempText.setTempText("Node created!", 1);
             inCreation = false;
         }
         if (Input.GetKeyDown(KeyCode.Alpha2))
         {
             BinaryTree.createNode(MouseLook.getCamPosition() + MouseLook.getCamForward() * 3, 0);
             TempText.fadeInDec = 0.2f;
             TempText.setTempText("Node created!", 1);
             inCreation = false;
         }
         if (Input.GetKeyDown(KeyCode.Alpha3))
         {
             GenericNode.createNode(MouseLook.getCamPosition() + MouseLook.getCamForward() * 3, 0);
             TempText.fadeInDec = 0.2f;
             TempText.setTempText("Node created!", 1);
             inCreation = false;
         }
     }
     else
     {
         if (Input.GetKeyDown(KeyCode.Z))
         {
             inCreation         = true;
             TempText.fadeInDec = 0f;
             TempText.setTempText("Node creation started: Press 1 for a LinkedList node, Press 2 for a Binary Tree Node, and Press 3 for a Generic Node", 300); // indefinite
         }
     }
 }