Пример #1
0
    // Use this for initialization
    private void Start()
    {
        _lightSource = GetComponent<Light2D>();
        _startRadius = _lightSource.LightRadius;
        _lightScaler = GetComponent<BeatLightScaler>();
        _goalX = 0;

        _levelManager = Camera.main.GetComponent<LevelManager>();

        Camera.main.GetComponent<BeatTracker>().BeatEvent += (sender, args)=>LightBeat();
    }
Пример #2
0
    private void Start()
    {
        _colorToLerp = LightSource.LightColor;
        _lastSpawnUnits = 0;
        _spawnsCounter = 3;
        isStatsSended = false;
        _wasErrorNetwork = false;
        _playerStat = GetComponent<PlayerStat>();
        _lightLogic = Light.GetComponent<LightLogic>();
        _darkSpawn = 0;

        ProgressBar.SetActive(true);
        WinText.gameObject.SetActive(false);
        _shadowSource = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren<BeatLightScaler>();
        AudioSource.PlayClipAtPoint(NewStart, transform.position);
    }