Exemple #1
0
 private void Awake()
 {
     commandAbility  = GetComponentInParent <CommandAbility>();
     panelController = GetComponentInParent <PanelController>();
     btn             = GetComponent <Button>();
     btn.onClick.AddListener(Command);
     btn.onClick.AddListener(ClosePanel);
 }
Exemple #2
0
 private void Awake()
 {
     commandAbility = GetComponentInParent <CommandAbility>();
     GetComponent <SelectableGameObject>().OnClickEvent += delegate { commandAbility.Use(); };
 }