Exemple #1
0
 void Update()
 {
     mouseRay = Camera.main.ScreenPointToRay(Input.mousePosition);
     MovingCameraInHouse();
     if (Input.GetMouseButtonDown(0))
     {
         if (Physics.Raycast(mouseRay, out selection, 200f, canSelect))
         {
             IInteracting interacting = selection.transform.GetComponent <IInteracting>();
             if (interacting != null)
             {
                 interacting.Interacting();
             }
         }
         else
         {
             HoldingObjectManager.Instance().EmptyHands();
         }
     }
     if (Input.GetKeyDown(KeyCode.H))
     {
         SeedBagManager.AddSeeds(startingSeed);
     }
     if (Input.GetKeyDown(KeyCode.G))
     {
         SeedBagManager.AddSeeds(startingSeed2);
     }
 }
Exemple #2
0
 void Update()
 {
     mouseRay = Camera.main.ScreenPointToRay(Input.mousePosition);
     if (Input.GetKeyDown(KeyCode.A))
     {
         SeedBagManager.AddSeeds(startingSeed);
     }
     if (Input.GetKeyDown(KeyCode.S))
     {
         startingSeed = null;
     }
     if (Input.GetMouseButtonDown(0))
     {
         if (Physics.Raycast(mouseRay, out selection, 200f, canSelect))
         {
             IInteracting interacting = selection.transform.GetComponent <IInteracting>();
             if (interacting != null)
             {
                 interacting.Interacting();
             }
         }
     }
 }