// ***********************************************************************
// Assembly : Game
// Author : Kimch
// Created : 2020-09-02
// Description :
// Last Modified By :
// Last Modified On :
// ***********************************************************************
//
//
// ***********************************************************************
using UnityEngine;
namespace G
{
///
///
///
public class Bullet_delay2 : MonoBehaviour
{
public float show_delay;
public float disable_delay;
public bool moveleft;
private void OnEnable()
{
Invoke(nameof(StartObj), show_delay);
Invoke(nameof(FinishObj), disable_delay);
this.GetComponent().enabled = false;
}
private void StartObj()
{
this.gameObject.SetActive(true);
this.GetComponent().enabled = true;
}
private void FinishObj()
{
this.gameObject.SetActive(false);
this.GetComponent().enabled = false;
}
private void Update()
{
if (moveleft)
{
this.transform.position -= transform.right * (Time.deltaTime * 0.2f);
}
}
}
}