Beispiel #1
0
    protected virtual void GetCellAndMove(RaycastHit hit)
    {
        Cell cellPos = MoveTo(cells, hit.point);

        if (cellPos != null)//position is not taken
        {
            GenericInteraction obj    = Interaction.GetCurrent();
            Vector3            buffer = new Vector3(0, obj.transform.localScale.y / 2f, 0);
            obj.SetSurfaceCell(cellPos);
            StartCoroutine(Interaction.DelayThePhysics(cellPos.Position() + buffer, obj));
        }
        else
        {
            Debug.Log("This slot is taken!!");
        }
    }
 public override void CheckForUtensil()
 {
     if (localCell.interactions.Count < limit)
     {
         GenericInteraction current = Interaction.GetCurrent();
         localCell.SetPosition(transform.position + bottom);
         localCell.interactions.Add(current);
         current.SetSurfaceCell(localCell);
         buffer = new Vector3(0, transform.position.y / 2, 0);
         StartCoroutine(Interaction.DelayThePhysics(localCell.Position() + buffer, current));
     }
     else
     {
         Debug.Log("Pan full");
         //localCell.SetOccupied(true);
     }
 }