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

public class Furniture : MonoBehaviour
{
    public GameObject item;
    public GameObject fallenItem;
	
	private bool dropped = false;

    void Start ()
    {
        if (fallenItem != null)
            fallenItem.SetActive(false);
    }

    public void Rotate()
    {
        item.transform.Rotate(new Vector3(0, 0, 90));
    }

    public void DropStuff()
    {
        item.SetActive(false);
        fallenItem.SetActive(true);
        fallenItem.GetComponent<TurningVisible>().SetVisiblity(1);
		if(!dropped)
			Wave.createWave(transform.position, Vector2.up, 360, 20, 40, false);
		dropped = true;
    }
}
