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

public class LookPoint : MonoBehaviour
{
    public GameStartUI gameStartUI;
    private float speed = 270f;
    public bool StartUp;
    public Transform aniTransform;
    private bool tar;
    private float lastTimer = 1f;


    private void Update()
    {
        if (StartUp)
        {
            if(tar == false)
            {
                tar = true;
                aniTransform.gameObject.SetActive(true);
            }

            Vector3 pos = transform.position;
            pos += speed * Vector3.up * Time.deltaTime;
            transform.position = pos;

            lastTimer -= Time.deltaTime;
            if(lastTimer < 0f)
            {
                aniTransform.gameObject.SetActive(false);
                GameApp.Instance.SpawnPlayerAwayCamera();
                gameObject.SetActive(false);
            }
        }
    }

    public void StartUP()
    {
        StartUp = true;
    }
}
