Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Laser : MonoBehaviour
private float _speed = 8.0f;
void Update()
transform.Translate(Vector3.up * _speed * Time.deltaTime);
if (transform.position.y >= 7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment