예제 #1
0
    private void CreateButton(CrewMember c, ContentManager cm)
    {
        Button button = cm.CreateButton(c.GetComponent <SpriteRenderer> ().sprite, c.personName);

        button.onClick.AddListener(delegate {
            selectionManager.Select(c, true);
            SetCurrent(button);
        });
    }
예제 #2
0
    protected void PopulateCrewMenu()
    {
        for (int i = 0; i < otherShip.crewMembers.Count; i++)
        {
            CrewMember c      = otherShip.crewMembers [i];
            Button     button = otherPeopleContent.CreateButton(c.GetComponent <SpriteRenderer> ().sprite,
                                                                c.personName);

            button.onClick.AddListener(delegate {
                SetCurrent(button);
                selectionManager.Select(c, true);
                ToggleCrewActions(true);
            });
        }
    }