private static void SetSelfPathFlag(Life life, AIEventData data) { if (life == null) { return; } if (life is Role) { Role w = life as Role; RoleGridRun m = w.run; if (m != null) { m.SetUpdataPath(data); } } if (life is Pet) { Pet w = life as Pet; if (w.PetMoveAI != null && w.PetMoveAI is PetWalk1002) { PetGridRun m = (w.PetMoveAI as PetWalk1002).m_run; m.SetUpdataPath(data); } } }
public override void Init(AIEventData data, BaseEntity owner) { base.Init(data, owner); HungerAboveAIEventData hungerAboveData = data.hungerAboveData; Value = hungerAboveData.value; }
public override void Init(AIEventData data, BaseEntity owner) { base.Init(data, owner); AggressionTimerAIEventData aggressionTimerData = data.aggressionTimerData; Value = aggressionTimerData.value; }
public override void Init(AIEventData data, BaseEntity owner) { base.Init(data, owner); AmmoBelowAIEventData ammoBelowData = data.ammoBelowData; Value = ammoBelowData.value; }
public bool DoPathCheck(AIEventData data) { if (data.Event == AIEvent.EVENT_MAP) { if (MapGrid.GetMG(m_Owner.MapPos).Type == GridType.GRID_HOLE || MapGrid.GetMG(run.NGrid).Type == GridType.GRID_HOLE) { return(true); } } if (run.m_FindAttackpos) { return(false); } if (data.Event == AIEvent.EVENT_SELFSP) { return(true); } if (m_Owner.m_Skill.CheckAttackTarget()) { return(false); } if (CurrentAction is GridActionCmdFall) { return(false); } return(true); }
public override void Init(AIEventData data, BaseEntity owner) { base.Init(data, owner); HealthBelowAIEventData healthBelowData = data.healthBelowData; HealthFraction = healthBelowData.healthFraction; }
public override void Init(AIEventData data, BaseEntity owner) { base.Init(data, owner); InRangeAIEventData inRangeData = data.inRangeData; Range = inRangeData.range; }
public override AIEventData ToProto() { AIEventData aIEventData = base.ToProto(); aIEventData.hungerAboveData = new HungerAboveAIEventData(); aIEventData.hungerAboveData.value = Value; return(aIEventData); }
public override AIEventData ToProto() { AIEventData aIEventData = base.ToProto(); aIEventData.inRangeData = new InRangeAIEventData(); aIEventData.inRangeData.range = Range; return(aIEventData); }
public override AIEventData ToProto() { AIEventData aIEventData = base.ToProto(); aIEventData.ammoBelowData = new AmmoBelowAIEventData(); aIEventData.ammoBelowData.value = Value; return(aIEventData); }
public override AIEventData ToProto() { AIEventData aIEventData = base.ToProto(); aIEventData.aggressionTimerData = new AggressionTimerAIEventData(); aIEventData.aggressionTimerData.value = Value; return(aIEventData); }
public override AIEventData ToProto() { AIEventData aIEventData = base.ToProto(); aIEventData.chanceData = new ChanceAIEventData(); aIEventData.chanceData.value = Chance; return(aIEventData); }
public override AIEventData ToProto() { AIEventData aIEventData = base.ToProto(); aIEventData.healthBelowData = new HealthBelowAIEventData(); aIEventData.healthBelowData.healthFraction = HealthFraction; return(aIEventData); }
// true data1 大。 public static bool ComareEvent(AIEventData data1, AIEventData data2) { if (data1.Event > data2.Event) { return(false); } else { return(true); } }
private static void SetUpdataPathFlag(List <Life> RoleList, AIEventData data) { if (RoleList == null || RoleList.Count == 0) { return; } foreach (Life life in RoleList) { SetSelfPathFlag(life, data); } }
/// <summary> /// 个体寻路事件 /// </summary> public static void AIPathEvent(AIEventData data, Life life) { switch (data.Event) { case AIEvent.EVENT_SELFSP: SetSelfPathFlag(life, data); break; case AIEvent.EVENT_CHANGETARGET: SetSelfPathFlag(life, data); break; default: break; } }
public void SetUpdataPath(AIEventData data) { m_UpdataPathFlag = true; if (m_AIEventData == null) { m_AIEventData = data; if (this is RoleGridRun) { (this as RoleGridRun).RoleParent.InterruptAction(data); } } else { if (AIPathConditions.ComareEvent(data, m_AIEventData)) { m_AIEventData = data; if (this is RoleGridRun) { (this as RoleGridRun).RoleParent.InterruptAction(data); } } } }
public override void Init(AIEventData data, BaseEntity owner) { base.Init(data, owner); }
public override void Init(AIEventData data, BaseEntity owner) { base.Init(data, owner); Chance = data.chanceData.value; }
//Event 事件类型 /// <summary> /// 群体寻路事件 /// </summary> public static void AIPathEvent(AIEventData data, List <Life> list) { SetUpdataPathFlag(list, data); }
public virtual void Init(AIEventData data, BaseEntity owner) { Init(data.triggerStateContainer, data.id, owner, data.inputMemorySlot, data.outputMemorySlot, data.inverted); }