Example #1
0
 // Update is called once per frame
 void Update()
 {
     currentSelectedJunction = selector.overJunction;
     if (Input.GetMouseButtonDown(0))
     {
         currentSelectedJunction.RotateCW();
         audioManager.PlayPipeMove();
     }
     else if (Input.GetMouseButtonDown(1))
     {
         currentSelectedJunction.RotateCCW();
         audioManager.PlayPipeMove();
     }
     else if (Input.GetKeyDown(KeyCode.W))
     {
         //Debug.Log(0);
         selector.MoveUp();
     }
     else if (Input.GetKeyDown(KeyCode.D))
     {
         selector.MoveRight();
     }
     else if (Input.GetKeyDown(KeyCode.S))
     {
         selector.MoveDown();
     }
     else if (Input.GetKeyDown(KeyCode.A))
     {
         selector.MoveLeft();
     }
 }