Inheritance: UnityEngine.MonoBehaviour
コード例 #1
0
        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();
            });
        }
コード例 #2
0
        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;
            }
        }