예제 #1
0
    public void MoveToNetworkGame()
    {
        PlayClicked = true;

        //send the character
        string tosend = "character|" + player1character;

        netController.Send(tosend);
        localChose = true;

        CheckNetworkSelections();
    }
예제 #2
0
    public void EmoteClicked(int emote)
    {
        //deactivate emote buttons
        emoteButtons.SetActive(false);
        ToggleOpen panelManager = GameObject.FindGameObjectWithTag("panelManager").GetComponent <ToggleOpen>();

        panelManager.SelectedPanel = null;

        //get the emote text
        emoteText = emotePanel.transform.GetChild(0).GetComponent <Text>();

        PlayEmoteAudio(emote);
        StartCoroutine(AnimateLocalEmotePanel(emote));

        int gameIndex = SceneManager.GetActiveScene().buildIndex;

        if (gameIndex == 7)
        {
            //send the emote over the network
            netController = GameObject.FindGameObjectWithTag("network").GetComponent <NetworkControl>();
            string tosend = "emote|" + emote;
            netController.Send(tosend);
        }
    }