void Awake() { sceneController = GameObject.FindGameObjectWithTag("GameController").GetComponent<SheepBank>(); topDonationButton_sprite = topDonateButton_Obj.GetComponent<tk2dSprite>(); downDonationButton_sprite = downDonateButton_Obj.GetComponent<tk2dSprite>(); //@!-- Find index of donation_button texture; activeDonationButton_id = topDonationButton_sprite.GetSpriteIdByName("Donate_button"); unactiveDonationButton_id = topDonationButton_sprite.GetSpriteIdByName("Donate_button_unactive"); }
// Use this for initialization void Start() { currentPageIndex = 0; confirmationWindow.gameObject.SetActiveRecursively(false); var controller = GameObject.FindGameObjectWithTag("GameController"); sceneController = controller.GetComponent<SheepBank>(); OnUpgrade_Event += Handle_OnUpgrade_Event; }