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

public class Bug : MonoBehaviour {

    public string secondLevel;
    public bool canmovemos = false;
    public bool canmovebie = false;

    public Vector3 orgScale;
    public Vector3 orgPos;
    public GameObject win;

    // Use this for initialization
    void Start () {
        orgScale = transform.localScale;
        orgPos = transform.position;
        win.SetActive(false);
	}
	
	// Update is called once per frame
	void Update ()
    {
		//if(transform.localScale.x <= 2f)
        //{
        //    //transform.position = orgPos;
        //    transform.parent.gameObject.transform.position = orgPos;
        //    transform.localScale = orgScale;
        //}
	}
    //GOD FUCKING DAMMIT, I COULD HAVE JUST CHANGED THE SPRITE IN THE PLAYER BUBBLE.
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.CompareTag("Mosquito"))
        {
            canmovemos = true;
            //gameObject.SetActive(false);
            //gameObject.transform.parent.gameObject.SetActive(false);
            //collision.GetComponent<Shrinking>().enabled = true;
            //collision.GetComponentInParent<Drag>().enabled = true;
        }
        if (collision.gameObject.CompareTag("Bie"))
        {
            win.SetActive(true);
            Time.timeScale = 0;
        }
    }
}
