public int statIndex; //The stat this slider controls void OnEnable() { //Initial GetComponent Calls sliderComponent = GetComponent <Slider>(); control = GetComponent <SlidersControl>(); view = GetComponent <SlidersView>(); //Subscribe to NodeManager events NodeManager.activeNodeUpdateEvent += OnActiveNodeUpdate; NodeManager.nodeDeleteEvent += OnNodeDelete; NodeModel.NodeModelRefreshActiveNodeEvent += OnRefreshActiveNodeEvent; }
void OnEnable() { model = GetComponent <SlidersModel>(); view = GetComponent <SlidersView>(); }