Ejemplo n.º 1
0
    // EVENTS
    public void OnEnd()
    {
        foreach (HitObject HO in HitObjects)
        {
            HO.Reset();
        }

        if (_miss != 0)
        {
            Fretboard f = GetComponentInParent <Fretboard>();
            if (f)
            {
                if (_player_miss != 0)
                {
                    Assets.Scripts.Token t = new Assets.Scripts.Token(_name, Assets.Scripts.Token.Sequence_State.Fail, _hit, _player_miss);
                    f.AddToken(t);
                }
                else
                {
                    Assets.Scripts.Token t = new Assets.Scripts.Token(_name, Assets.Scripts.Token.Sequence_State.Background, _hit, _miss);
                    f.AddToken(t);
                }
            }
            //output fail pattern;
        }
        else
        {
            Fretboard f = GetComponentInParent <Fretboard>();
            if (f)
            {
                Assets.Scripts.Token t = new Assets.Scripts.Token(_name, Assets.Scripts.Token.Sequence_State.Success, _hit, _miss);
                f.AddToken(t);
            }
            // output success pattern
        }
        if (_loop)
        {
            BeginAt(_Time_Since_Start - _length);
        }
        else
        {
            Stop();
            _Time_Since_Start = 0;
        }

        Fretboard f2 = GetComponentInParent <Fretboard>();

        if (f2)
        {
            f2.OnSequenceEnd();
        }
    }
Ejemplo n.º 2
0
 // TOKENS
 public void AddToken(Assets.Scripts.Token Token)
 {
     _tokens.Enqueue(Token);
 }