예제 #1
0
        public HUD(ContentManager content, ChangeSelected changeSelected)
        {
            this.content        = content;
            this.icons          = new List <HUDIcon>();
            this.selected       = new List <HUDSelected>();
            this.changeSelected = changeSelected;


            Vector2 hudPosition = new Vector2(Constants.RESOLUTION_X / 3, Constants.RESOLUTION_Y - 96);

            string[] skillIcons = { "Boo", "Blast", "Appear", "Hide" };
            for (int i = 0; i < skillIcons.Length; i++)
            {
                Vector2 position = Vector2.Add(hudPosition, new Vector2((HUDIcon.ICON_SIZE * i) + (SPACE * (i + 1) + HUDIcon.ICON_SIZE), HUDIcon.ICON_SIZE / 1.5f));
                icons.Add(new HUDIcon(content, position, skillIcons[i]));
            }
        }
예제 #2
0
 private void SelectDepartmentComboBox_SelectionChangeCommitted(object sender, EventArgs e)
 {
     ChangeSelected?.Invoke(this, EventArgs.Empty);
 }
 /// <summary>
 /// <see cref="Selected"/>が変更された時に実行
 /// </summary>
 /// <param name="e"><see cref="Selected"/>の変更前後が与えられた<see cref="ToolValueEventArgs{T}"/>のインスタンス</param>
 protected virtual void OnChangeSelected(ToolValueEventArgs <bool> e)
 {
     ChangeSelected?.Invoke(this, e);
 }