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

public class VihuTriggerScript : MonoBehaviour, InformShow
{

    public float lastsee;
    bool activ;

    bool onground;
    float lastcolltime;

    // Start is called before the first frame update
    void Awake()
    {
        lastsee = -100000;
    }

    // Update is called once per frame
    public void Show()
    {
        lastsee = Time.time;
        //print("i have been");
    }

    public void FixedUpdate()
    {

        if (Time.time - lastsee < 3)
        {
            transform.parent.GetComponent<Rigidbody2D>().gravityScale = 1;
            transform.parent.GetComponent<VihuScript>().activ = true;
        } else
        {
            //transform.parent.GetComponent<Rigidbody2D>().gravityScale = 0;
            transform.parent.GetComponent<VihuScript>().activ = false;
        }


    }
}
