Example #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);
     }
 }
Example #2
0
 public void SelectingSeed(int selection)
 {
     if (seedBag[selection + seedBase] != null && HoldingObjectManager.Instance().GrabingSomething(HoldingObjectManager.ObjectInHands.Seed))
     {
         selectedSeed = seedBag[selection + seedBase];
         Cursor.SetCursor(selectedSeed.GetPlantGenes().GetRandomGene(0).GetSeedCursor(), Vector2.zero, CursorMode.Auto);
         selectedSeedPos = selection + seedBase;
     }
 }
Example #3
0
 private void Awake()
 {
     instance = this;
 }