// Update is called once per frame
    void Update()
    {
        var panda = Util.RaycastPanda();

        if (panda == null)
        {
            return;
        }
        if (Input.GetMouseButtonDown(0))
        {
            SoundManager.instance.PlayOneShotSound(SoundType.MenuClick);
            if (choosingTwoPandas)
            {
                if (firstPanda == panda)
                {
                    panda.Deselect(1);
                    firstPandaRepresentation.Clear();
                    firstPanda = null;
                    childPandaRepresentation.Clear();
                    return;
                }
                if (secondPanda == panda)
                {
                    panda.Deselect(2);
                    secondPandaRepresentation.Clear();
                    secondPanda = null;
                    childPandaRepresentation.Clear();
                    return;
                }
                if (firstPanda == null)
                {
                    firstPanda = panda;
                    panda.Select(1);
                    firstPandaRepresentation.LoadPanda(firstPanda.GetStats());
                    if (firstPanda != null && secondPanda != null && firstPanda.GetGender() != secondPanda.GetGender())
                    {
                        PredictThirdPanda(firstPanda, secondPanda);
                    }
                    return;
                }
                if (secondPanda == null)
                {
                    secondPanda = panda;
                    panda.Select(2);
                    secondPandaRepresentation.LoadPanda(secondPanda.GetStats());
                    if (firstPanda != null && secondPanda != null && firstPanda.GetGender() != secondPanda.GetGender())
                    {
                        PredictThirdPanda(firstPanda, secondPanda);
                    }
                    return;
                }
            }
            else
            {
                if (firstPanda == panda)
                {
                    panda.Deselect(1);
                    firstPandaRepresentation.Clear();
                    firstPanda = null;
                    return;
                }

                if (firstPanda != null)
                {
                    firstPanda.Deselect(1);
                }

                firstPanda = panda;
                panda.Select(1);
                firstPandaRepresentation.LoadPanda(firstPanda.GetStats());
            }
        }
    }
    private void PredictThirdPanda(IPanda firstPanda, IPanda secondPanda)
    {
        var pandaStats = childPandaCreator.CreateChildStats(firstPanda.GetStats(), secondPanda.GetStats());

        childPandaRepresentation.LoadPanda(pandaStats);
    }