public new void Awake() { base.Awake(); eventMediator.AddOnUnitSelected(OnUnitSelected); eventMediator.AddOnUnitDeselected(OnUnitDeselected); eventMediator.AddOnUnitMoved(OnUnitMoved); eventMediator.AddOnUnitHovered(OnUnitHovered); uiEventMediator = GetComponent <UIEventBoardMediator>(); uiEventMediator.Init(); uiEventMediator.AddOnBaseActivateClicked(OnBaseActivateClicked); uiEventMediator.AddOnBaseDeactivateClicked(OnBaseDeactivateClicked); }
private void Awake() { eventBoardMediator = GetComponent <UnitSelectionBoardMediator>(); eventBoardMediator.Init(); eventBoardMediator.AddOnUnitSelected(OnUnitSelected); eventBoardMediator.AddOnUnitDeselected(OnUnitDeselected); uiEventBoardMediator = GetComponent <UIEventBoardMediator>(); uiEventBoardMediator.Init(); uiEventBoardMediator.AddOnUnitBaseActivateComplete(OnUnitBaseActivateComplete); uiEventBoardMediator.AddOnUnitBaseDeactivateComplete(OnUnitBaseDeactivateComplete); config.activateButton.interactable = !isBaseActive; config.deactivateButton.interactable = !config.activateButton.interactable; }