Ejemplo n.º 1
0
    private void UpdateShieldDirection()
    {
        float angle = controlls.GetCurrentAngle();

        if (angle < 0)
        {
            shieldDirection = Direction.Left;
        }
        else
        {
            shieldDirection = Direction.Right;
        }
    }
Ejemplo n.º 2
0
    private void Update()
    {
        float currentAngle = controlls.GetCurrentAngle();

        if (currentAngle > resetRange.min && currentAngle < resetRange.max)
        {
            canSpawn = true;
        }
        else if (canSpawn)
        {
            if (currentAngle < range.min + angleOffset)
            {
                ApplyEffects(Direction.Left);
            }
            else if (currentAngle > range.max - angleOffset)
            {
                ApplyEffects(Direction.Right);
            }
        }
    }