Example #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.transform.CompareTag("Player"))
        {
            switch (type)
            {
            case BumperType.BackBumper:
                movementsComponent.ApplyTempMultiplicator(backBumpSpeedMultiplicator, backBumpDuration);
                break;

            case BumperType.LeftBumper:
                SideBumper(other.GetComponent <Movements>());
                break;

            case BumperType.RightBumper:
                SideBumper(other.GetComponent <Movements>());
                break;
            }
        }
    }