<file_sep>using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Inventory : MonoBehaviour
{
    List<Items> itemList;

    public Inventory()
    {
        itemList = new List<Items>();

        Debug.Log("Inventory");
    }
}
<file_sep>using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Projectile : MonoBehaviour
{

    public float speed = 10000f;
    public float lifeTime = 1f;
    public Rigidbody rB;

    void Start()
    {
        rB.AddForce(rB.transform.forward * speed);
    }
    void Awake() { Destroy(gameObject, lifeTime); }
}
<file_sep>using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Items : MonoBehaviour
{
    public enum ItemType
    {
        Sword,
        Shield,
        Wand,
        Potion,
    }

    public ItemType itemType;
    public int amount;
}
<file_sep>using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Gun : MonoBehaviour
{
    public GameObject Sphere;
    public Transform Spawn;

    void Update()
    {
        if (Input.GetButtonDown("Fire1"))
        {
            Instantiate(Sphere, Spawn.position, Spawn.rotation);
            //Debug.Log("fire" + Spawn.position + Spawn.rotation);
        }
    }
}
<file_sep>using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class playercollision : MonoBehaviour
{
    // Start is called before the first frame update
    private void OnCollisionEnter(Collision collision)
    {
        if (collision.collider.tag == "object")
        {
            Debug.Log("awauu");
        }
    }
}
<file_sep># Unity-Project-Template
project template for unity
<file_sep>using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
    public float force = 1000f;
    public Rigidbody rB;
    void FixedUpdate()
    {
        float forcetime = force * Time.deltaTime;
        if (Input.GetKey("w"))
        {
            rB.AddForce(0, 0, forcetime);
        }
        if (Input.GetKey("s"))
        {
            rB.AddForce(0, 0, -forcetime);
        }
        if (Input.GetKey("d"))
        {
            rB.AddForce(forcetime, 0, 0);
        }
        if (Input.GetKey("a"))
        {
            rB.AddForce(-forcetime, 0, 0);
        }

         //Get the Screen positions of the object
         Vector2 positionOnScreen = Camera.main.WorldToViewportPoint (transform.position);
         
         //Get the Screen position of the mouse
         Vector2 mouseOnScreen = (Vector2)Camera.main.ScreenToViewportPoint(Input.mousePosition);
         
         //Get the angle between the points
         float angle = AngleBetweenTwoPoints(positionOnScreen, mouseOnScreen);
 
         //Ta Daaa
         transform.rotation = Quaternion.Euler (new Vector3(0f, -angle, 0f));

    }
    float AngleBetweenTwoPoints(Vector3 a, Vector3 b)
    {
        return Mathf.Atan2(a.y - b.y, a.x - b.x) * Mathf.Rad2Deg;
    }
}