Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        t_beatSprite = this.transform;
        i_beatMatch  = this.GetComponent <BeatMatchingManager>();

        i_beatMatch.OnValid += Move;
    }
Пример #2
0
    // Start is called before the first frame update
    void Start()
    {
        t_beatSprite    = this.GetComponentInChildren <SpriteRenderer>().gameObject.transform;
        sr_beatSprite   = this.GetComponentInChildren <SpriteRenderer>();
        i_impulseSource = this.GetComponent <CinemachineImpulseSource>();
        i_beatMatch     = this.GetComponent <BeatMatchingManager>();
        i_conductor     = FindObjectOfType <Conductor>();

        c_origTransform = transform.localScale;
        c_hitTransform  = c_origTransform * 4.0f;

        i_conductor.OnBeat    += BeatHit;
        i_beatMatch.OnValid   += VisualizeValidHit;
        i_beatMatch.OnInvalid += VisualizeInvalidHit;
    }