Exemple #1
0
    void Start()
    {
        if (GameManager.Instance.type.Equals(ConnectionType.CLIENT))
        {
            //Debug.LogError("Client connected with ip: " + GameManager.Instance.IP);
            c.Client(GameManager.Instance.IP);

            shootButton.onDown.AddListener(StartShooting);
            shootButton.onUp.AddListener(StopShooting);

            playButton.gameObject.SetActive(false);

            panelsManager.ShowLobbyPanel();
        }
        else
        {
            Destroy(this.gameObject);
            Destroy(this);
        }
    }