Пример #1
0
    private void ActionNave(SpaceCrib nave)
    {
        if (cribPart != TipoItem.vazio)
        {
            nave.AttachPart(cribPart);

            cribPart = TipoItem.vazio;
        }
    }
Пример #2
0
 private void ActionSlot(PartSlot partWanted)
 {
     Debug.Log("ActionSlot");
     if (partWanted != null && partWanted.Tipo != TipoItem.vazio && cribPart != TipoItem.vazio)
     {
         SpaceCrib nave = partWanted.gameObject.GetComponentInParent <SpaceCrib>();
         if (partWanted.Tipo == cribPart)
         {
             if (nave.AttachPart(cribPart))
             {
                 cribPart = TipoItem.vazio;
             }
         }
         else
         {
             nave.PlayFailFix();
         }
     }
 }