24 lines
461 B
C#
24 lines
461 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
public class BulletMovement : MonoBehaviour
|
|
{
|
|
public float moveSpeed = 10;
|
|
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
transform.Translate(Vector2.up * (Time.deltaTime * moveSpeed));
|
|
}
|
|
|
|
private void OnTriggerEnter2D(Collider2D other)
|
|
{
|
|
}
|
|
}
|