Esempio n. 1
0
 private void Start()
 {
     reloader     = this.GetComponent <ReloadManager>();
     bombBaySript = this.GetComponentInChildren <BombBayControls>();
     leftBombLight.GetComponent <Renderer>().material  = onMaterial;
     rightBombLight.GetComponent <Renderer>().material = offMaterial;
 }
Esempio n. 2
0
 private void OnDestroy()
 {
     if (Instance == this)
     {
         Instance = null;
     }
 }
Esempio n. 3
0
    public Vector3 handleStartDist; //get the position when the player actually preses the grip on the handle

    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
    }
 public void SetUp()
 {
     _managerMock = new Mock <ReloadManager>()
     {
         CallBase = true
     };
     _manager = _managerMock.Object;
 }
Esempio n. 5
0
 void Awake()
 {
     gunParticles = GetComponentInChildren <ParticleSystem> ();
     gunAudio     = GetComponentInChildren <AudioSource> ();
     gunLight     = GetComponentInChildren <Light> ();
     player       = GameObject.FindGameObjectWithTag("Player");
     playerHealth = player.GetComponent <PlayerHealth> ();
     anim         = player.GetComponent <Animator> ();
     currentAmmo  = ammo;
     reloadText   = GameObject.FindGameObjectWithTag("Text").GetComponent <ReloadManager> ();
 }
Esempio n. 6
0
 // Start is called before the first frame update
 void Awake()
 {
     bdc = this.GetComponentInParent <BombDropController>();
     //Quaternion rotation = this.transform.rotation * Quaternion.Euler(-90, 0, 0);
     //currentBomb = Instantiate(bombPrefab, new Vector3(this.transform.position.x, this.transform.position.y - distanceBelowShip, this.transform.position.z + distanceInFrontShip), rotation, this.transform.parent);
     //leftBomb = Instantiate(bombPrefab, new Vector3(this.transform.position.x - distanceToSideShip, this.transform.position.y - distanceBelowShip, this.transform.position.z + distanceInFrontShip), rotation, this.transform.parent);
     //rightBomb = Instantiate(bombPrefab, new Vector3(this.transform.position.x + distanceToSideShip, this.transform.position.y - distanceBelowShip, this.transform.position.z + distanceInFrontShip), rotation, this.transform.parent);
     //reloading = true;
     rm           = this.GetComponentInParent <ReloadManager>();
     audioManager = GameObject.Find("AudioManager").GetComponent <AudioManager>();
 }
 // Start is called before the first frame update
 void Start()
 {
     GunShot = this.GetComponent <AudioSource>();
     sg      = this.GetComponent <ShootGun>();
     gr      = this.GetComponentInParent <GunRecoiler>();
     //guic = this.GetComponent<GunnerUIController>();
     timeSinceShot = 0.0f;
     ammoCount     = magazineSize;
     timeReloading = 0.0f;
     reloading     = false;
     rm            = this.GetComponentInParent <ReloadManager>();
 }
 void Awake()
 {
     rm         = this.gameObject.GetComponentInParent <ReloadManager>();
     timer      = gunner.GetComponent <PlayerGunController>().timeToReload;
     ReloadFlag = true;
 }
Esempio n. 9
0
 // Start is called before the first frame update
 void Start()
 {
     reloader = this.GetComponent <ReloadManager>();
 }