コード例 #1
0
 private void Start()
 {
     reloader     = this.GetComponent <ReloadManager>();
     bombBaySript = this.GetComponentInChildren <BombBayControls>();
     leftBombLight.GetComponent <Renderer>().material  = onMaterial;
     rightBombLight.GetComponent <Renderer>().material = offMaterial;
 }
コード例 #2
0
 private void OnDestroy()
 {
     if (Instance == this)
     {
         Instance = null;
     }
 }
コード例 #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;
        }
    }
コード例 #4
0
 public void SetUp()
 {
     _managerMock = new Mock <ReloadManager>()
     {
         CallBase = true
     };
     _manager = _managerMock.Object;
 }
コード例 #5
0
ファイル: Gun.cs プロジェクト: bk-rooftop/rocktop4ho
 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> ();
 }
コード例 #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>();
 }
コード例 #7
0
 // 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>();
 }
コード例 #8
0
 void Awake()
 {
     rm         = this.gameObject.GetComponentInParent <ReloadManager>();
     timer      = gunner.GetComponent <PlayerGunController>().timeToReload;
     ReloadFlag = true;
 }
コード例 #9
0
ファイル: ArmedLight.cs プロジェクト: ShaunPrince/BombsAway
 // Start is called before the first frame update
 void Start()
 {
     reloader = this.GetComponent <ReloadManager>();
 }