67 lines
1.2 KiB
C#
67 lines
1.2 KiB
C#
using UnityEngine;
|
|
|
|
public class RadarBoosterItem : GrabbableObject
|
|
{
|
|
public bool radarEnabled;
|
|
|
|
private Animator radarBoosterAnimator;
|
|
|
|
public GameObject radarDot;
|
|
|
|
public AudioSource radarBoosterAudio;
|
|
|
|
public AudioClip turnOnSFX;
|
|
|
|
public AudioClip turnOffSFX;
|
|
|
|
public override void Start()
|
|
{
|
|
base.Start();
|
|
}
|
|
|
|
public void EnableRadarBooster(bool enable)
|
|
{
|
|
radarBoosterAnimator.SetBool("on", enable);
|
|
radarDot.SetActive(enable);
|
|
if (enable)
|
|
{
|
|
radarBoosterAudio.PlayOneShot(turnOnSFX);
|
|
WalkieTalkie.TransmitOneShotAudio(radarBoosterAudio, turnOnSFX);
|
|
}
|
|
else
|
|
{
|
|
radarBoosterAudio.PlayOneShot(turnOffSFX);
|
|
WalkieTalkie.TransmitOneShotAudio(radarBoosterAudio, turnOffSFX);
|
|
}
|
|
radarEnabled = enable;
|
|
}
|
|
|
|
public override void ItemActivate(bool used, bool buttonDown = true)
|
|
{
|
|
base.ItemActivate(used, buttonDown);
|
|
}
|
|
|
|
public override void PocketItem()
|
|
{
|
|
}
|
|
|
|
public override void DiscardItem()
|
|
{
|
|
base.DiscardItem();
|
|
}
|
|
|
|
public override void Update()
|
|
{
|
|
base.Update();
|
|
}
|
|
|
|
protected override void __initializeVariables()
|
|
{
|
|
base.__initializeVariables();
|
|
}
|
|
|
|
protected internal override string __getTypeName()
|
|
{
|
|
return "RadarBoosterItem";
|
|
}
|
|
}
|