Exemple #1
0
 public void Initialize()
 {
     if (newHeartController == null)
     {
         newHeartController = FindObjectOfType <NewHeartController>();
     }
     if (uiController == null)
     {
         uiController = FindObjectOfType <UIController>();
     }
     if (noDiceNoCoinController == null)
     {
         noDiceNoCoinController = FindObjectOfType <NoDiceNoCoinController>();
     }
     if (resetDiceController == null)
     {
         resetDiceController = FindObjectOfType <ResetDiceController>();
     }
     if (mapController == null)
     {
         mapController = FindObjectOfType <MapController>();
     }
     if (levelLoader == null)
     {
         levelLoader = FindObjectOfType <LevelLoader>();
     }
 }
Exemple #2
0
 private void Initialize()
 {
     levelLoader            = FindObjectOfType <LevelLoader>();
     noDiceNoCoinController = FindObjectOfType <NoDiceNoCoinController>();
     blockController        = FindObjectOfType <BlockController>();
     moneyArea       = GameObject.Find(Constants.GAME_OBJECT_NAME.STAGE.MONEY_AREA);
     costText        = GameObject.Find(Constants.GAME_OBJECT_NAME.STAGE.COST_TEXT).GetComponent <Text>();
     moneyText       = GameObject.Find(Constants.GAME_OBJECT_NAME.STAGE.MONEY_TEXT).GetComponent <Text>();
     attackPowerText = GameObject.Find(Constants.GAME_OBJECT_NAME.STAGE.ATTACK_POWER_TEXT).GetComponent <Text>();
 }
    void Awake()
    {
        if (levelLoader == null)
        {
            levelLoader = FindObjectOfType <LevelLoader>();
        }
        if (diceController == null)
        {
            diceController = FindObjectOfType <DiceController>();
        }
        if (blockController == null)
        {
            blockController = FindObjectOfType <BlockController>();
        }
        if (itemController == null)
        {
            itemController = FindObjectOfType <ItemController>();
        }
        if (noDiceNoCoinController == null)
        {
            noDiceNoCoinController = FindObjectOfType <NoDiceNoCoinController>();
        }
        if (speicalBlockController == null)
        {
            speicalBlockController = FindObjectOfType <SpeicalBlockController>();
        }
        if (statisticsController == null)
        {
            statisticsController = FindObjectOfType <StatisticsController>();
        }
        if (resetDiceController == null)
        {
            resetDiceController = FindObjectOfType <ResetDiceController>();
        }
        if (uiController == null)
        {
            uiController = FindObjectOfType <UIController>();
        }
        if (heartShopController == null)
        {
            heartShopController = FindObjectOfType <HeartShopController>();
        }
        if (itemShopController == null)
        {
            itemShopController = FindObjectOfType <ItemShopController>();
        }
        if (diamondShopController == null)
        {
            diamondShopController = FindObjectOfType <DiamondShopController>();
        }
        if (startController == null)
        {
            startController = FindObjectOfType <StartController>();
        }
        if (newHeartController == null)
        {
            newHeartController = FindObjectOfType <NewHeartController>();
        }
        if (diamondController == null)
        {
            diamondController = FindObjectOfType <DiamondController>();
        }
        if (iAPManager == null)
        {
            iAPManager = FindObjectOfType <IAPManager>();
        }
        if (rewardController == null)
        {
            rewardController = FindObjectOfType <RewardController>();
        }
        if (this.name != Constants.GAME_OBJECT_NAME.STAGE.CLONED_BLOCK)
        {
            cameraShakersForPlate = FindObjectsOfType <CameraShaker>();
        }

        _initialize();
    }