using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[CreateAssetMenu(menuName = "Actions/Evacuation")]
public class ActionEvacuation : ActionAsset {

    public GameObject helicopterPrefab;

    public override void Action(Tile targetTile)
    {
        base.Action(targetTile);

        HouseTile house = targetTile as HouseTile;
        house.Evacuate();
        house.eligibleActions.Remove(this);

        Instantiate(helicopterPrefab, house.transform.position, Quaternion.identity, house.transform);

        //SandbagTile sandbag = TileManager.Instance.Build(targetTile, sandbagTilePrefab) as SandbagTile;
    }
}
