예제 #1
0
    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);
    }
예제 #2
0
 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;
 }