22 lines
		
	
	
		
			375 B
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			22 lines
		
	
	
		
			375 B
		
	
	
	
		
			C#
		
	
	
	
|  | using System.Collections; | |||
|  | using System.Collections.Generic; | |||
|  | using UnityEngine; | |||
|  | 
 | |||
|  | public class ACSwitch : MonoBehaviour | |||
|  | { | |||
|  |     [SerializeField] Animator mAC; | |||
|  | 
 | |||
|  |     private bool mIsOn = false; | |||
|  |     public bool IsOn | |||
|  |     { | |||
|  |         get | |||
|  |         { | |||
|  |             return mIsOn; | |||
|  |         } | |||
|  |         set | |||
|  |         { | |||
|  |             mIsOn = value; | |||
|  |             mAC.enabled = mIsOn; | |||
|  |         } | |||
|  |     } | |||
|  | } |