Emote System Code Example


using System.Collections;

using System.Collections.Generic;

using UnityEngine;



public class EmoteSystem : MonoBehaviour

{



    public Animator Playerr;

    public GameObject icone1;

    public GameObject icone2;

    public GameObject IconePopup;



    // Start is called before the first frame update

    void Start()

    {

        IconePopup.SetActive(false);

        icone1.SetActive(true);

        icone2.SetActive(false);

    }

    public void icon1()

    {

        IconePopup.SetActive(true);

        icone1.SetActive(false);

        icone2.SetActive(true);

    }

    public void icon2()

    {

        IconePopup.SetActive(false);

        icone1.SetActive(true);

        icone2.SetActive(false);

    }

    public void Emote1()

    {

        IconePopup.SetActive(false);

        

        Playerr.SetBool("1", true);

    }

    public void Emote1off()

    {

        Playerr.SetBool("1", false);

    }



    public void Emote2()

    {

        IconePopup.SetActive(false);

        Playerr.SetBool("2", true);

    }

    public void Emote2off()

    {

        Playerr.SetBool("2", false);

    }



    public void Emote3()

    {

        IconePopup.SetActive(false);

        Playerr.SetBool("3", true);

    }

    public void Emote3off()

    {

        Playerr.SetBool("3", false);

    }



    public void Emote4()

    {

        IconePopup.SetActive(false);

        Playerr.SetBool("4", true);

    }

    public void Emote4off()

    {

        Playerr.SetBool("4", false);

    }



    public void Emote5()

    {

        IconePopup.SetActive(false);

        Playerr.SetBool("5", true);

    }

    public void Emote5off()

    {

        Playerr.SetBool("5", false);

    }

}