Exemplo n.º 1
0
    private void Start()
    {
        //Get Component
        bGenerator   = SingletonManager.Get <BoardGenerator>();
        cManager     = SingletonManager.Get <CombatManager>();
        camShake     = Camera.main.GetComponent <CameraShake>();
        actionMana   = SingletonManager.Get <ActionMana>();
        audioManager = SingletonManager.Get <AudioManager>();

        //AddListener
        OnDestroyTiles.AddListener(StartDestroyMatchedTiles);
        bGenerator.OnBoardGenerateDone.AddListener(GetBoard);
        cManager.OnCurrentRoundEnd.AddListener(OnRoundEnded);
    }
Exemplo n.º 2
0
    void Start()
    {
        if (textDisplay != null)
        {
            textDisplay.text = fillNormalizer.ToString();
        }
        if (fillDisplay != null)
        {
            fillDisplay.fillAmount = 1;
        }

        board      = SingletonManager.Get <BoardHandler>();
        combat     = SingletonManager.Get <CombatManager>();
        actionMana = SingletonManager.Get <ActionMana>();

        combat.OnCurrentRoundEnd.AddListener(ResetDisplayValue);
        combat.OnTutorialRoundEnd.AddListener(ResetDisplayValue);
        board.OnAddTile.AddListener(SubtractDisplayValue);
        board.OnRemoveTile.AddListener(AddDisplayValue);

        desiredValue   = actionMana.CurrentAction;
        resetToValue   = actionMana.CurrentAction;
        fillNormalizer = actionMana.CurrentAction;
    }