public void DeclineInvite(GameObject go) { Character character = GamePlayer.Instance().gameEntity.GetCharacter(); GuildInviteInfo inviteInfo = go.GetComponent <GuildInviteInfo>(); GuildApi.instance.DeclineInvite(character.id, inviteInfo.guildId, (status) => { UpdateStatus(); }); }
private void ShowInvites(GuildInvites invites) { GmUtil.DestroyChildren(invitePanel.transform); foreach (GuildInvite invite in invites.guildInvite) { GameObject go = GameObject.Instantiate(inviteTemplate); go.SetActive(true); go.transform.SetParent(invitePanel.transform); go.name = invite.guildId; Text text = go.transform.Find("invite_text").GetComponent <Text>(); text.text = "Invite to " + invite.guildId; GuildInviteInfo info = go.GetComponent <GuildInviteInfo>(); info.guildId = invite.guildId; info.from = invite.from; info.to = invite.to; } }