void Awake() { if (thisCalculator == null) { thisCalculator = new SlickBowShooting.BowDataCalculator(this); } InitFields(); }
public override void SetUpReference() { base.SetUpReference(); IPlayerDataManager playerDataManager = CollectPlayerDataManager(); thisShootingDataManager.SetPlayerDataManager(playerDataManager); IBowDataCalculator bowDataCalculator = new BowDataCalculator(playerDataManagerAdaptor); thisShootingDataManager.SetBowDataCalculator(bowDataCalculator); }
public override void SetUpReference() { IUIElementGroupScroller bowPanelScroller = (IUIElementGroupScroller)bowPanelGroupScrollerAdaptor.GetUIElement(); thisWidget.SetBowPanelGroupScroller(bowPanelScroller); IBowPanel[] bowPanels = CollectBowPanels(); thisWidget.SetBowPanels(bowPanels); foreach (IBowPanel bowPanel in bowPanels) { bowPanel.SetBowConfigWidget(thisWidget); } IPlayerDataManager playerDataManager = playerDataManagerAdaptor.GetPlayerDataManager(); thisWidget.SetPlayerDataManager(playerDataManager); IBowDataCalculator bowDataCalculator = new BowDataCalculator(playerDataManagerAdaptor); thisWidget.SetBowDataCalculator(bowDataCalculator); IResourcePanel resourcePanel = resourcePanelAdaptor.GetResourcePanel(); thisWidget.SetResourcePanel(resourcePanel); ICurrencyPane currencyPane = currencyPaneAdaptor.GetCurrencyPane(); thisWidget.SetCurrencyPane(currencyPane); IBowUnlockButton[] unlockButtons = CollectBowUnlockButtons(); thisWidget.SetBowUnlockButtons(unlockButtons); foreach (IBowUnlockButton button in unlockButtons) { button.SetBowConfigWidget(thisWidget); } IPopText popText = bowConfigLabelPopTextAdaptor.GetPopText(); thisWidget.SetBowConfigLabelPopText(popText); }