using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class teuowei : MonoBehaviour
{
GameObject go;
// Start is called before the first frame update
void Start()
{
go = GameObject.Instantiate(Resources.Load<GameObject>("Accelerate"));
go.transform.SetParent(transform);
go.transform.localPosition = new Vector3(-17.59f,1.97f,22.16f);
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown("a"))
{
go.GetComponent<TrailRenderer>().emitting = true;
}
if (Input.GetKeyDown("b"))
{
Destroy(go);
//go.GetComponent<TrailRenderer>().emitting = true;
}
}
}