36 lines
789 B
C#
36 lines
789 B
C#
using Watermelon.IAPStore;
|
|
|
|
namespace Watermelon.SquadShooter
|
|
{
|
|
public sealed class MenuStoreButton : MenuPanelButton
|
|
{
|
|
private UIStore storePanel;
|
|
|
|
public override void Init()
|
|
{
|
|
base.Init();
|
|
|
|
storePanel = UIController.GetPage<UIStore>();
|
|
}
|
|
|
|
public override bool IsActive()
|
|
{
|
|
return IAPManager.IsInitialized;
|
|
}
|
|
|
|
protected override bool IsHighlightRequired()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
protected override void OnButtonClicked()
|
|
{
|
|
if (UIController.IsDisplayed<UIStore>())
|
|
return;
|
|
|
|
UIStore.OpenAsOverlay();
|
|
|
|
AudioController.PlaySound(AudioController.GetClip("button_sound"));
|
|
}
|
|
}
|
|
} |