using System.Collections.Generic;
using UnityEngine;

public class Button : TileAsset
{
	public List<StateTileAsset> toActivate;
	
	public override bool CanEnter(Vector2Int comingFrom, Vector2Int goingInto, Orientation orientation)
	{
		return true;
	}

	public override void OnEnter(GameObject player)
	{
		AudioController.Play("Button");

		foreach (var tileAsset in toActivate)
		{
			tileAsset.SwitchState();
		}
	}

	public override void OnLeave(GameObject player)
	{
		foreach (var tileAsset in toActivate)
		{
			tileAsset.SwitchState();
		}
	}
}