private void KillAction() { if (this.action != null) { this.action.DeInit(); this.action = null; } }
public AIMove1027(EntityBase entity, int range) : base(entity) { this.action = new ActionBattle(); if (range < 1) { range = 1; } this.range = range; }
protected override void OnInitBase() { this.bExcuteShow = false; Vector3 vector = this.target.position - base.m_Entity.position; if (vector.magnitude < this.maxdis) { base.End(); } else { base.m_Entity.m_AniCtrl.SetString("Skill", "MoveMiss"); base.m_Entity.m_AniCtrl.SendEvent("Skill", false); this.KillAction(); this.action = new ActionBattle(); this.action.Init(base.m_Entity); this.action.AddActionWaitDelegate(0.5f, () => base.m_Entity.PlayEffect(0x2f4d72)); this.action.AddActionWaitDelegate(0.4f, () => this.Show(false)); this.action.AddActionWaitDelegate(0.6f, delegate { float endx = 0f; float endz = 0f; if (this.move2target) { GameLogic.Release.MapCreatorCtrl.RandomItemSide(GameLogic.Self, this.range, out endx, out endz); } else { Vector3 vector = GameLogic.Release.MapCreatorCtrl.RandomPosition(); endx = vector.x; endz = vector.z; } this.endpos = new Vector3(endx, 0f, endz); }); this.action.AddActionWaitDelegate(0.4f, delegate { base.m_Entity.SetPosition(this.endpos); this.Show(true); base.m_Entity.m_AniCtrl.SetString("Skill", "MoveShow"); base.m_Entity.m_AniCtrl.SendEvent("Skill", false); base.m_Entity.PlayEffect(0x2f4d72); }); ConditionTime time = new ConditionTime { time = 2.5f }; this.mCondition = time; } }
public AIMove1026(EntityBase entity, int range) : base(entity) { this.action = new ActionBattle(); if (entity != null) { EntityMonsterBase base2 = entity as EntityMonsterBase; if (base2 != null) { AIBase aI = base2.GetAI(); if (aI != null) { this.m_AIGroiund = aI as AIGroundBase; } } } base.name = "1026move"; this.range = range; }
public AIMove1041(EntityBase entity) : base(entity) { this.count = 30; this.action = new ActionBattle(); }
public AIMove1038(EntityBase entity) : base(entity) { this.attackcount = 8; this.action = new ActionBattle(); this.weapondata = LocalModelManager.Instance.Weapon_weapon.GetBeanById(0x13af); }