Esempio n. 1
0
    private void UpdateAttackSignal()
    {
        var colour = _attackSignalImage.color;

        colour.a = 0;

        if (_enemy.AttackingThisBeat() && !_enemy.AttackingNextBeat())
        {
            if (!_timeManager.AtHalfBeat)
            {
                //Fade off if not attack next turn
                colour.a = 1.0f - _timeManager.ProgressThroughBeat * 2;
            }
        }
        else
        {
            if (_enemy.AttackingNextBeat() && _timeManager.AtHalfBeat)
            {
                colour.a = ((_timeManager.ProgressThroughBeat - 0.5f) * 4);
            }
        }
        if (_enemy.AttackingThisBeat() && _enemy.AttackingNextBeat())
        {
            colour.a = 1.0f;
        }

        _attackSignalImage.color = colour;
    }