Skip to content

Instantly share code, notes, and snippets.

@SenpaiRar
Created May 6, 2020 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SenpaiRar/af9b9501f7eafbfde2df8ff1dc0d793f to your computer and use it in GitHub Desktop.
Save SenpaiRar/af9b9501f7eafbfde2df8ff1dc0d793f to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SinoSodalBullet : MonoBehaviour
{
public float Speed;
private void Start(){
StartCoroutine(LifeSpawn());
}
private void Update(){
transform.Translate(Vector3.forward*Time.deltaTime*Speed, Space.Self);
}
IEnumerator LifeSpawn(){
yield return new WaitForSecondsRealtime(10.0f);
Destroy(gameObject);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment