2023-07-24 16:38:13 +03:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
2023-08-15 17:38:54 +03:00
|
|
|
public class TimeBonus : BaseItem
|
2023-07-24 16:38:13 +03:00
|
|
|
{
|
|
|
|
[SerializeField]
|
|
|
|
private int _timeBonus;
|
|
|
|
|
|
|
|
private vTimerCounter _timerCounter;
|
|
|
|
|
|
|
|
private void Awake()
|
|
|
|
{
|
|
|
|
_timerCounter = FindObjectOfType<vTimerCounter>();
|
|
|
|
}
|
|
|
|
|
2023-08-15 17:38:54 +03:00
|
|
|
public override void Interact()
|
2023-07-24 16:38:13 +03:00
|
|
|
{
|
2023-08-15 17:38:54 +03:00
|
|
|
base.Interact();
|
2023-07-24 16:38:13 +03:00
|
|
|
_timerCounter.AddTime(_timeBonus);
|
|
|
|
}
|
|
|
|
}
|