// Copyright (c) 2024 Synty Studios Limited. All rights reserved.
//
// Use of this software is subject to the terms and conditions of the Synty Studios End User Licence Agreement (EULA)
// available at: https://syntystore.com/pages/end-user-licence-agreement
//
// Sample scripts are included only as examples and are not intended as production-ready.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Synty.Interface.FantasyWarriorHUD.Samples
{
///
/// Executes a list of animator actions and toggles a list of game objects on click.
///
public class SampleButtonAction : MonoBehaviour
{
[Header("References")]
public Button button;
public List deactivateObjects;
public List toggleObjects;
public GameObject activateObject;
[Header("Parameters")]
public List animatorActions;
public float activeTime = 1f;
public bool diableButtonWhenActive = false;
public bool runOnEnable;
public bool applyRandomRotationToActivateObject;
private void Awake()
{
if (button == null)
{
button = GetComponent