// Copyright (C) 2015-2021 gamevanilla - All rights reserved.
// This code can only be used under the standard Unity Asset Store End User License Agreement.
// A Copy of the Asset Store EULA is available at http://unity3d.com/company/legal/as_terms.
using UnityEngine;
using UnityEngine.UI;
namespace UltimateClean
{
///
/// Custom switch component used in the kit. You can think of it as an animated toggle.
///
[RequireComponent(typeof(Button))]
[RequireComponent(typeof(Animator))]
public class Switch : MonoBehaviour
{
private Button button;
private Animator animator;
private Image bgEnabledImage;
private Image bgDisabledImage;
private Image handleEnabledImage;
private Image handleDisabledImage;
private bool switchEnabled;
private void Awake()
{
button = GetComponent