コード例 #1
0
 // Unity methods
 protected override void Awake()
 {
     base.Awake();
     for (int cc = 0; cc < ActionButtonLabels.Length; cc++)
     {
         ButtonStruct bs = this [cc];
         bs.name    = ActionButtonLabels[cc];
         bs.label   = ActionButtonLabels[cc];
         bs.active  = false;
         bs.onClick = new Button.ButtonClickedEvent();
         this [cc]  = bs;
     }
 }
コード例 #2
0
 public new ButtonStruct this [int index] {
     get {
         ButtonStruct bs = new ButtonStruct();
         bs.name    = MenuChoices[index].name;
         bs.label   = MenuLabels[index];
         bs.active  = MenuChoices[index].interactable;
         bs.onClick = MenuChoices[index].onClick;
         return(bs);
     }
     set {
         MenuChoices[index].interactable = value.active;
         MenuChoices[index].name         = value.name;
         MenuLabels[index]          = value.label;
         MenuChoices[index].onClick = value.onClick;
     }
 }