protected override void Awake() { base.Awake(); var gameInstance = GameInstance.Singleton; gameObject.tag = gameInstance.monsterTag; var time = Time.unscaledTime; MonsterActivityComponent.RandomNextWanderTime(time, this, CacheTransform); MonsterActivityComponent.SetFindTargetTime(time, this); MonsterActivityComponent.SetStartFollowTargetTime(time, this); }
public override void Respawn() { if (!IsServer || CurrentHp > 0) { return; } base.Respawn(); StopMove(); CacheNetTransform.Teleport(respawnPosition, CacheTransform.rotation); MonsterActivityComponent.RandomNextWanderTime(Time.unscaledTime, this, CacheTransform); isHidding.Value = false; }