Adding gun to our Robot
At first, part of the tutorial we learned how to give the ability to walk and jump with animation to our Robot, now we will give him a gun and shoot enemies with bullets, we will add also enemies that our robot will kill them, but we have to be sure our robot is stronger than other robots :P Now let's get started straight to work :D FIRST STEP: ADD GUN TO OUR PLAYER AND SHOOT WITH IT Now the first thing we will do is create a script that will control our weapon, we will call it "Weapon" the script is below: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Weapon : MonoBehaviour { public float offset; public GameObject projectile; public GameObject shotEffect; public Transform shotPoint; private float timeBtwShots; public float startTimeBtwShots; ...