rabidus-test/Assets/Scripts/BoostZone.cs

20 lines
446 B
C#
Raw Normal View History

2023-07-24 16:38:13 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
2023-09-05 17:38:11 +03:00
public class BoostZone : MonoBehaviour
2023-07-24 16:38:13 +03:00
{
[SerializeField]
2023-10-02 19:12:35 +03:00
private float _breakMultiplier = 0.6f;
2023-09-05 17:38:11 +03:00
2023-10-02 19:12:35 +03:00
public void UseBoost(Collider collider)
2023-07-24 16:38:13 +03:00
{
2023-10-02 19:12:35 +03:00
collider.GetComponent<ShipPathFollower>().FastBreak(_breakMultiplier);
2023-07-24 16:38:13 +03:00
}
2023-10-02 19:12:35 +03:00
public void UseBoost2(Collider collider)
2023-07-24 16:38:13 +03:00
{
2023-10-02 19:12:35 +03:00
collider.GetComponent<ShipPathFollower>().FastBoost(50);
2023-07-24 16:38:13 +03:00
}
}