// Token: 0x06000EB2 RID: 3762 RVA: 0x000693D0 File Offset: 0x000675D0 private void CheckSpawn() { if (Player.m_localPlayer == null) { return; } this.RemoveSeendTempTexts(); Raven.RavenText bestText = this.GetBestText(); if (this.IsSpawned() && this.CanHide() && bestText != null && bestText != this.m_currentText) { this.FlyAway(true); this.m_currentText = null; } if (this.IsAway() && bestText != null) { if (this.EnemyNearby(base.transform.position)) { return; } if (RandEventSystem.InEvent()) { return; } bool forceTeleport = this.m_timeSinceTeleport < 6f; this.Spawn(bestText, forceTeleport); } }
// Token: 0x0600037D RID: 893 RVA: 0x0001E560 File Offset: 0x0001C760 public override bool HuntPlayer() { return(base.HuntPlayer() && (!this.IsEventCreature() || RandEventSystem.InEvent()) && (!this.DespawnInDay() || !EnvMan.instance.IsDay())); }
// Token: 0x06000EA9 RID: 3753 RVA: 0x00068CF0 File Offset: 0x00066EF0 private void Update() { this.m_timeSinceTeleport += Time.deltaTime; if (!this.IsAway() && !this.IsFlying() && Player.m_localPlayer) { Vector3 vector = Player.m_localPlayer.transform.position - base.transform.position; vector.y = 0f; vector.Normalize(); float f = Vector3.SignedAngle(base.transform.forward, vector, Vector3.up); if (Mathf.Abs(f) > this.m_minRotationAngle) { this.m_animator.SetFloat("anglevel", this.m_rotateSpeed * Mathf.Sign(f), 0.4f, Time.deltaTime); base.transform.rotation = Quaternion.RotateTowards(base.transform.rotation, Quaternion.LookRotation(vector), Time.deltaTime * this.m_rotateSpeed); } else { this.m_animator.SetFloat("anglevel", 0f, 0.4f, Time.deltaTime); } } if (this.IsSpawned()) { if (Player.m_localPlayer != null && !Chat.instance.IsDialogVisible(base.gameObject) && Vector3.Distance(Player.m_localPlayer.transform.position, base.transform.position) < this.m_autoTalkDistance) { this.m_randomTextTimer += Time.deltaTime; float num = this.m_hasTalked ? this.m_randomTextInterval : this.m_randomTextIntervalImportant; if (this.m_randomTextTimer >= num) { this.m_randomTextTimer = 0f; if (this.m_hasTalked) { this.Say("", this.m_randomTexts[UnityEngine.Random.Range(0, this.m_randomTexts.Count)], false, false, false); } else { this.Say("", this.m_randomTextsImportant[UnityEngine.Random.Range(0, this.m_randomTextsImportant.Count)], false, false, false); } } } if ((Player.m_localPlayer == null || Vector3.Distance(Player.m_localPlayer.transform.position, base.transform.position) > this.m_despawnDistance || this.EnemyNearby(base.transform.position) || RandEventSystem.InEvent() || this.m_currentText == null || this.m_groundObject == null || this.m_hasTalked) && this.CanHide()) { bool forceTeleport = this.GetBestText() != null || this.m_groundObject == null; this.FlyAway(forceTeleport); this.RestartSpawnCheck(3f); } this.m_exclamation.SetActive(!this.m_hasTalked); return; } this.m_exclamation.SetActive(false); }