public void Init(ChallengerCreator _creator, int _id, string playerName, string facebookID, bool done) { this.playerName = playerName; this.facebookID = facebookID; RemindButton.SetActive(false); this.creator = _creator; this.id = _id; usernameLabel.text = playerName.ToUpper(); profilePicture.setPicture(facebookID); if (done) { SendButton.SetActive(false); RemindButton.SetActive(true); GetComponent <Button>().onClick.AddListener(() => { Remind(); }); } else { GetComponent <Button>().onClick.AddListener(() => { creator.Challenge(playerName, facebookID); }); } }
public void Init(ChallengerCreator _creator, string playerName, string facebookID, bool done) { this.playerName = playerName; this.facebookID = facebookID; Ready.SetActive(false); this.creator = _creator; usernameLabel.text = playerName.ToUpper(); profilePicture.setPicture(facebookID); if (done) { SendButton.SetActive(false); Ready.SetActive(true); //GetComponent<Button>().onClick.AddListener(() => //{ // Remind(); //}); } else { SendButton.GetComponent<Button>().onClick.AddListener(() => { creator.Challenge(playerName, facebookID); }); } }