Ejemplo n.º 1
0
 // Update is called once per frame
 private void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         state.Click();
     }
     else if (Input.GetMouseButtonUp(0))
     {
         state.Release();
     }
     else if (Input.GetMouseButtonDown(1))
     {
         state.RightClick();
     }
     else
     {
         state.Hover();
     }
     if (Input.GetKeyDown(KeyCode.G))
     {
         PlaceBuilding(manager.Build[4]);
     }
 }