Пример #1
0
 void Update()
 {
     if (Input.GetMouseButtonDown(0) && isTurn)
     {
         var hit = Physics2D.Raycast(Camera.main.ScreenToWorldPoint(Input.mousePosition), Vector2.zero);
         if (hit.collider != null)
         {
             ContainerController containerController = hit.transform.gameObject.GetComponent <ContainerController>();
             lastMoveId = containerController.id;
             containerController.SetState(localPlayerSelection, localPlayerSprite);
             isTurn = false;
         }
     }
 }