public override void OnEnter() { base.OnEnter(); //Grab the tracking component HuntressTracker huntressTracker = base.GetComponent <HuntressTracker>(); //Find the target if (huntressTracker && base.isAuthority) { this.target = huntressTracker.GetTrackingTarget(); } //Determine the cast-time this.duration = this.baseDuration / base.attackSpeedStat; //Get the transform of the model Transform modelTransform = GetModelTransform(); //If the model transform exists if (modelTransform) { //Grab the child locator ChildLocator childLocator = modelTransform.GetComponent <ChildLocator>(); //Find the muzzle with the given string this.muzzle = childLocator.FindChild(this.assetRef.muzzleString); //Nab the animator this.animator = modelTransform.GetComponent <Animator>(); } //Play the sound based on attack speed Util.PlayAttackSpeedSound(this.assetRef.attackSoundString, base.gameObject, base.attackSpeedStat); //Make sure body exists and do the thing where it looks towards where you aim if (base.characterBody) { base.characterBody.SetAimTimer(duration + 1f); } //Play the animations base.PlayCrossfade("Gesture, Override", "FireSeekingShot", "FireSeekingShot.playbackRate", this.duration, this.duration * 0.2f / this.attackSpeedStat); base.PlayCrossfade("Gesture, Additive", "FireSeekingShot", "FireSeekingShot.playbackRate", this.duration, this.duration * 0.2f / this.attackSpeedStat); }
// Token: 0x06001D15 RID: 7445 RVA: 0x0007C73D File Offset: 0x0007A93D private static bool HasTarget([NotNull] GenericSkill skillSlot) { HuntressTracker huntressTracker = ((HuntressTrackingSkillDef.InstanceData)skillSlot.skillInstanceData).huntressTracker; return((huntressTracker != null) ? huntressTracker.GetTrackingTarget() : null); }