Hello,
So I’m making a side scroller, but it’s been over a year since I’ve coded anything.
I’m checking the code from a tutorial (brackeys)
I’m at the pulling my hair out phaze and this makes no sense at all.
here is a copy of the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpawnBullet : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
public Transform FirePoint;
public GameObject BulletPrefab;
}
// Update is called once per frame
void Update()
{
if(Input.GetKeyDown(“f”))
{
Debug.Log(“Fire!”);
fireweapon();
}
}
void fireweapon()
{
//Bullet Logic
instantiate(BulletPrefab, FirePoint.position, FirePoint.rotation);
}
}