KNU_SpaceShooter/Assets/02_Scripts/Bullet.cs

15 lines
271 B
C#
Raw Permalink Normal View History

2024-09-11 17:14:03 +09:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Bullet : MonoBehaviour
{
private Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
rb.AddRelativeForce(Vector3.forward * 800.0f);
}
}