private void Start()
 {
     _rigidBody = GetComponent <Rigidbody2D>();
     _gun       = GetComponent <Gun>();
 }
Beispiel #2
0
 /// <summary>
 /// sets the game node scale in the constructor
 /// </summary>
 /// <param name="mSceneMgr"></param>
 /// <param name="gun"></param>
 /// <param name="playerAmoury"></param>
 public CollectableGun(SceneManager mSceneMgr, Gun gun, Armoury playerAmoury)
 {
     this.mSceneMgr = mSceneMgr;
     GameNode.Scale(new Vector3(1.5f));
 }
 private void Start()
 {
     GunSystem   = GetComponent <Gun>();
     _rigidbody  = GetComponent <Rigidbody2D>();
     _mainCamera = Camera.main;
 }
Beispiel #4
0
        /// Need to add (new List<Gun>();) to the constructor.


        ///<summary>
        /// Change gun method.
        /// </summary>


        public void ChangeGun(Gun gun)
        {
            activeGun = new Gun();
            gunChange = true;
        }