rabidus-test/Assets/Scripts/MultiplyVelocityZone.cs

23 lines
437 B
C#
Raw Normal View History

2023-07-24 16:38:13 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MultiplyVelocityZone : TriggerZone
{
[SerializeField]
[Range(0,1)]
private float _velocityMultiplier;
protected override void InZone()
{
base.InZone();
_ship.StopBoost();
_ship.MultiplyVelocity(_velocityMultiplier);
}
protected override void OutZone()
{
base.OutZone();
}
}