private void SetupComponents() { /* Fire Bullet Component */ this.fireBulletComponent.bulletPrefab = this.bulletPrefab; this.fireBulletComponent.muzzleFlashPrefab = this.muzzleFlashPrefab; this.fireBulletComponent.dryFirePrefab = this.dryFirePrefab; this.fireBulletComponent.muzzleVelocity = this.muzzleVelocity; this.fireBulletComponent.hitLayers = this.shotHitLayers; /* Grab Component */ this.grabComponent.grabDistance = this.grabDistance; this.grabComponent.grabFlyTime = this.grabFlyTime; this.grabComponent.shouldFly = this.shouldFly; /* Outline */ if (this.GetComponent <SVOutline> ()) { SVOutline outline = this.GetComponent <SVOutline> (); outline.outlineThickness = this.outlineThickness; outline.outlineColor = this.outlineColor; } /* Revolver Barrel */ this.revolvingBarrel.numberOfChambers = this.numberOfChambers; this.revolvingBarrel.rotationSpeed = this.barrelRotationSpeed; this.revolvingBarrel.revolverOpenClip = this.revolverCloseClip; this.revolvingBarrel.revolverClickClip = this.revolverClickClip; this.revolvingBarrel.revolverCloseClip = this.revolverCloseClip; this.revolvingBarrel.openPosition = this.barrelOpenPosition; this.revolvingBarrel.closedPosition = this.barrelClosedPosition; this.revolvingBarrel.openSpeed = this.barrelOpenSpeed; this.revolvingBarrel.bulletPrefab = this.shellPrefab; this.revolvingBarrel.minRotationSpeedForReloading = this.minRotationSpeedForReloading; this.revolvingBarrel.openDurationReloadNeeded = this.openDurationReloadNeeded; this.revolvingBarrel.openDurationReloadNotNeeded = this.openDurationReloadNotNeeded; this.revolvingBarrel.minStayOpenDuration = this.minStayOpenDuration; this.revolvingBarrel.shellEjectionForce = this.shellEjectionForce; }
//------------------------ // Init //------------------------ void Start() { outlineComponent = this.gameObject.GetComponent <SVOutline>(); this.input = this.gameObject.GetComponent <SVControllerInput> (); }