Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class Machine : MonoBehaviour
- {
- [Tooltip("On/Off state of the machine.")]
- [SerializeField] protected bool m_State;
- [SerializeField] protected float m_PowerConsumption;
- [SerializeField] Animator[] m_Animators;
- void Update()
- {
- ToggleState();
- }
- void ToggleState()
- {
- //m_State = !m_State;
- foreach (Animator _anim in m_Animators)
- {
- _anim.SetBool("state", m_State);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement