private void LookAtPlayer() { if (!this.isLooking) { return; } PlayerActor player = this.Player; this.distanceToPlayer = Vector3.Distance(player.Position, this.Merchant.Position); if (this.IsCloseToPlayer && !this.isNearPlayer) { Transform trfTarg = player.FovTargetPointTable.get_Item(Actor.FovBodyPart.Head); ChaControl chaControl = this.Merchant.ChaControl; chaControl.ChangeLookEyesTarget(1, trfTarg, 0.5f, 0.0f, 1f, 2f); chaControl.ChangeLookEyesPtn(1); chaControl.ChangeLookNeckTarget(1, trfTarg, 0.5f, 0.0f, 1f, 0.8f); chaControl.ChangeLookNeckPtn(1, 1f); this.isNearPlayer = true; } else { if (!this.IsFarPlayer || !this.isNearPlayer) { return; } ChaControl chaControl = this.Merchant.ChaControl; chaControl.ChangeLookEyesPtn(3); chaControl.ChangeLookNeckPtn(3, 1f); this.isNearPlayer = false; } }
public virtual void OnStart() { ((Task)this).OnStart(); this.counter = 0.0f; this.Merchant.ActivateNavMeshObstacle(this.Merchant.Position); this.prevTalkable = this.Merchant.Talkable; if (!this.prevTalkable) { this.Merchant.Talkable = true; } this._player = !Singleton <Manager.Map> .IsInstance() ? (PlayerActor)null : Singleton <Manager.Map> .Instance.Player; this._merchant = this.Merchant; ChaControl chaControl = this.Merchant.ChaControl; chaControl.ChangeLookNeckTarget(1, this._player.FovTargetPointTable.get_Item(Actor.FovBodyPart.Head), 0.5f, 0.0f, 1f, 0.8f); chaControl.ChangeLookNeckPtn(1, 1f); }