Example #1
0
    public void OnCombineClick()
    {
        if (maleSlot.iconInSlot != null && femaleSlot.iconInSlot != null)
        {
            geneticToAdd = breedingManager.Breed(maleSlot.iconInSlot.sample.unit, femaleSlot.iconInSlot.sample.unit);
            RemoveGeneticIcon(maleSlot.iconInSlot.sample.id);
            RemoveGeneticIcon(femaleSlot.iconInSlot.sample.id);

            maleSlot.RemoveIconFromSlot();
            femaleSlot.RemoveIconFromSlot();

            leftPanel.HideBreedingPopup();

            mouseController.ChangeMouseMode(MouseMode.Targeting, targetingCallbackFunc: OnPlaceUnitDone);
        }
    }