Created
May 6, 2020 09:10
-
-
Save SenpaiRar/af9b9501f7eafbfde2df8ff1dc0d793f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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