public override void UpdateAction() { base.UpdateAction(); if (NodeUtil.StateActionMacro(Owner)) { } else { NodeUtil.LookPlayer(Owner); NodeUtil.RotationAnim(Owner, "run"); if (NodeUtil.PlayerInRange(Owner, 8f)) { if (NodeUtil.PlayerInRange(Owner, 5f)) { NodeUtil.ChangeAction(Owner, "DruidAttackAction"); NodeUtil.AvoidFormPlayer(Owner); } else { } } else { NodeUtil.ChangeAction(Owner, "DruidIdleAction"); } } }
public override void StartAction(Character owner) { base.StartAction(owner); NodeUtil.PlayAnim(Owner, "run"); NodeUtil.AvoidFormPlayer(owner); Owner.AddState(new CharacterIncreaseSpeedState(Owner, Owner.Status.CurrentSpeed * 2, 3f)); TimelineEvents.Add(new TimeLineEvent(3f, StopRun)); }
public override void UpdateAction() { base.UpdateAction(); if (NodeUtil.IsGoalDestination(Owner)) { if (NodeUtil.PlayerInRange(Owner, 10f)) { NodeUtil.AvoidFormPlayer(Owner); } } }
public override void UpdateAction() { base.UpdateAction(); if (NodeUtil.StateActionMacro(Owner)) { } else { NodeUtil.AvoidFormPlayer(Owner); NodeUtil.RotationAnim(Owner, "run"); if (!NodeUtil.PlayerInRange(Owner, 3f) || IsEnd) { NodeUtil.ChangeAction(Owner, "GoblinStealerIdleAction"); } } }
public override void UpdateAction() { base.UpdateAction(); if (isFinish) { return; } if (NodeUtil.StateActionMacro(Owner)) { } else { Owner.transform.rotation = Quaternion.LookRotation((Owner.transform.position - Player.CurrentPlayer.transform.position).normalized, Vector3.up); NodeUtil.RotationAnim(Owner, "run"); NodeUtil.AvoidFormPlayer(Owner); } }
public override void StartAction(Character owner) { base.StartAction(owner); NodeUtil.PlayAnim(Owner, "run"); NodeUtil.AvoidFormPlayer(Owner); }
public override void UpdateAction() { base.UpdateAction(); if (NodeUtil.StateActionMacro(Owner)) { } else { if (check1 == 1) { timer1 = timer1 + 1; if (timer1 == timer2) { timer1 = 0; timer2 = UnityEngine.Random.Range(40, 100); check1 = UnityEngine.Random.Range(1, 3); NodeUtil.StopMovement(Owner); } else { NodeUtil.LookPlayer(Owner); NodeUtil.RotationAnim(Owner, "run"); if (NodeUtil.PlayerInRange(Owner, 1f)) { NodeUtil.ChangeAction(Owner, "CSlimeAttackAction"); } else { NodeUtil.MoveToPlayer(Owner); } } } else if (check1 == 2) { timer1 = timer1 + 1; if (timer1 == timer2) { timer1 = 0; timer2 = UnityEngine.Random.Range(40, 100); check1 = UnityEngine.Random.Range(1, 3); } else { NodeUtil.LookPlayer(Owner); NodeUtil.RotationAnim(Owner, "idle"); NodeUtil.StopMovement(Owner); } } else if (check1 == 3) { timer1 = timer1 + 1; if (timer1 == timer2) { timer1 = 0; timer2 = UnityEngine.Random.Range(40, 100); check1 = UnityEngine.Random.Range(1, 3); } else { Owner.transform.rotation = Quaternion.LookRotation((Owner.transform.position - Player.CurrentPlayer.transform.position).normalized, Vector3.up); NodeUtil.RotationAnim(Owner, "run"); NodeUtil.AvoidFormPlayer(Owner); } } } }
public override void UpdateAction() { base.UpdateAction(); if (NodeUtil.StateActionMacro(Owner)) { } else { // 5M 이내로 진입할때 까지 movetoplayer if (NodeUtil.PlayerInRange(Owner, 5)) { if (pandan == 1 || pandan == 6)//공격 { NodeUtil.LookPlayer(Owner); NodeUtil.ChangeAction(Owner, "GoblinSlingAttackAction"); } else if (pandan == 2)//이동->플레이어 { timer2 += 0.1f; if (timer2 <= timer1) // 2m내에 있으면 판단 변수 재지정 아니면 이동 { NodeUtil.LookPlayer(Owner); NodeUtil.RotationAnim(Owner, "run"); NodeUtil.MoveToPlayer(Owner); } else { pandan = UnityEngine.Random.Range(min, max); timer2 = 0f; timer1 = UnityEngine.Random.Range(6, 10);; } } else if (pandan == 3)//대기 { NodeUtil.StopMovement(Owner); timer2 += 0.1f; if (timer2 <= timer1) { NodeUtil.LookPlayer(Owner); NodeUtil.RotationAnim(Owner, "idle"); } else { pandan = UnityEngine.Random.Range(min, max); timer2 = 0f; timer1 = UnityEngine.Random.Range(6, 10); } } else if (pandan == 4 || pandan == 5)//랜덤 장소로 이동 { timer2 += 0.05f; if (timer2 <= timer1) { NodeUtil.RotationAnim(Owner, "run"); if (chamgo == 0) { chamgo = 1; xx = UnityEngine.Random.Range(-1f, 1f); zz = UnityEngine.Random.Range(-1f, 1f); DesPos = Owner.transform.position + new Vector3(xx, 0, zz); Owner.transform.rotation = Quaternion.LookRotation((DesPos - Owner.transform.position).normalized, Vector3.up); } DesPos = Owner.transform.position + new Vector3(xx, 0, zz); NodeUtil.MoveToPpsition(Owner, DesPos); } else { pandan = UnityEngine.Random.Range(min, max); timer2 = 0f; chamgo = 0; timer1 = UnityEngine.Random.Range(6, 10); } } else //도망 { timer2 += 0.1f; if (timer2 <= timer1) // 7m내에 PC가 없으면 재지저 { Owner.transform.rotation = Quaternion.LookRotation((Owner.transform.position - Player.CurrentPlayer.transform.position).normalized, Vector3.up); NodeUtil.RotationAnim(Owner, "run"); NodeUtil.AvoidFormPlayer(Owner); } else { pandan = UnityEngine.Random.Range(min, max); timer2 = 0f; timer1 = UnityEngine.Random.Range(6, 10); } } } else { NodeUtil.LookPlayer(Owner); NodeUtil.RotationAnim(Owner, "run"); NodeUtil.MoveToPlayer(Owner); } } }