private void ActionNave(SpaceCrib nave) { if (cribPart != TipoItem.vazio) { nave.AttachPart(cribPart); cribPart = TipoItem.vazio; } }
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(); } } }