Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        _timeNextLeftKey  = Time.time + _timeRepeatRateLeftKey;
        _timeNextRightKey = Time.time + _timeRepeatRateRightKey;
        _timeNextDownKey  = Time.time + _timeRepeatRateDownKey;

        _dropTimeInterval               = _timeInterval;
        _dropTimeEdgeInterval           = _timeEdgeInterval;
        _dropTimeEnemyInterval          = _timeEnemyInterval;
        _dropTimeEnemySpawnInterval     = _timeEnemySpawnInterval;
        _dropTimeEnemyFastSpawnInterval = _timeEnemyFastSpawnInterval;
        _dropTimeScoreInterval          = _timeScoreInterval;

        _backgroundGrid = FindObjectOfType <BrickMenu_BackgroundGrid>();

        _menuOptions = FindObjectOfType <BrickMenu_Option>();
        if (!_menuOptions)
        {
            Debug.Log("not assign object");
        }
        _menuOptions.gameObject.SetActive(false);

        _audioManager = FindObjectOfType <BrickMenu_AudioManager>();
        if (!_audioManager)
        {
            Debug.Log("not assign object");
        }

        _animator = GetComponent <Animator>();
        if (!_animator)
        {
            Debug.Log("not assign object");
        }

        if (_pausePanel)
        {
            _pausePanel.SetActive(false);
        }

        _animator.SetTrigger("menu_start");
        PlaySound(_audioManager.gameOn, 0.2f);
    }
Пример #2
0
    private void SceneSpriteClear()
    {
        BrickMenu_Option sprite = FindObjectOfType <BrickMenu_Option>();

        sprite.gameObject.SetActive(false);
    }