protected override void OnInitBase() { this.delaytime = Updater.AliveTime + 0.15f; this.starttime = Updater.AliveTime; this.halftime = this.alltime / 2f; this.startpos = base.m_Entity.position; this.bAttack = false; bool dir = MathDxx.RandomBool(); if (!GameLogic.Release.MapCreatorCtrl.RandomItemLine(base.m_Entity, dir, this.rangemin, this.rangemax, out this.endx, out this.endz)) { dir = !dir; if (!GameLogic.Release.MapCreatorCtrl.RandomItemLine(base.m_Entity, dir, this.rangemin, this.rangemax, out this.endx, out this.endz)) { base.End(); return; } } this.perendx = (this.endx - base.m_Entity.position.x) / ((float)this.flyframe); this.perendz = (this.endz - base.m_Entity.position.z) / ((float)this.flyframe); base.m_Entity.SetObstacleCollider(false); base.m_Entity.m_AniCtrl.SendEvent("Skill", false); this.dir = new Vector3(this.perendx, 0f, this.perendz); this.UpdateDirection(); }
protected override void OnAttack(object[] args) { if (base.m_Entity.IsElite) { if (MathDxx.RandomBool()) { int num = 4; for (int i = 0; i < num; i++) { base.action.AddActionDelegate(() => base.CreateBulletOverride(Vector3.zero, 0f)); base.action.AddActionWait(0.18f); } } else { for (int i = 0; i < 4; i++) { base.CreateBulletOverride(Vector3.zero, (i * 90f) + 45f); } } } else { base.OnAttack(args); } }
protected override void OnInitBase() { if (base.m_Entity.m_HatredTarget == null) { base.End(); } else { base.m_Entity.mAniCtrlBase.UpdateAnimationSpeed("Skill", -0.5f); this.delaytime = Updater.AliveTime + 0.4f; this.starttime = Updater.AliveTime; this.halftime = this.alltime / 2f; this.startpos = base.m_Entity.position; this.bAttack = false; base.m_Entity.m_AniCtrl.SendEvent("Skill", false); this.endx = base.m_Entity.m_HatredTarget.position.x; this.endz = base.m_Entity.m_HatredTarget.position.z; bool flag = MathDxx.RandomBool(); this.perendx = (this.endx - base.m_Entity.position.x) / ((float)this.flyframe); this.perendz = (this.endz - base.m_Entity.position.z) / ((float)this.flyframe); base.m_Entity.SetObstacleCollider(false); this.dir = new Vector3(this.perendx, 0f, this.perendz); this.UpdateDirection(); } }
protected override void OnInitOnce() { bool flag = MathDxx.RandomBool(); float rota = -45f; if (flag) { rota *= -1f; } GameLogic.Release.Bullet.CreateBullet(base.m_Entity, 0x13da, base.m_Entity.position + new Vector3(0f, 1f, 0f), rota); GameLogic.Release.Bullet.CreateBullet(base.m_Entity, 0x13da, base.m_Entity.position + new Vector3(0f, 1f, 0f), rota + 180f); }
protected override void OnInit() { this.bulletid = base.m_Entity.m_Data.WeaponID; this.attack = LocalModelManager.Instance.Weapon_weapon.GetBeanById(this.bulletid).Attack; this.action.Init(base.m_Entity); base.AddAction(base.GetActionWait(string.Empty, 0x7d0)); base.AddAction(base.GetActionDelegate(delegate { this.startangle = !MathDxx.RandomBool() ? 45f : 0f; this.showlines(true); })); base.AddAction(base.GetActionWait(string.Empty, 0x3e8)); base.AddAction(base.GetActionDelegate(delegate { this.showlines(false); this.CreateBullets(); })); base.AddAction(base.GetActionWait(string.Empty, 0x7d0)); }
protected override void OnAttack(object[] args) { if (MathDxx.RandomBool()) { int count = 3; for (int i = 0; i < count; i++) { base.CreateBullet1020(Utils.GetBulletAngle(i, count, 90f)); } } else { int num3 = 3; for (int i = 0; i < num3; i++) { base.action.AddActionDelegate(() => base.CreateBullet1020(0f)); base.action.AddActionWait(0.15f); } } }
protected override void OnAttack(object[] args) { if (base.m_Entity.IsElite && MathDxx.RandomBool()) { int count = 4; for (int i = 0; i < count; i++) { base.CreateBulletOverride(Vector3.zero, Utils.GetBulletAngle(i, count, 90f)); } } else { for (int i = 0; i < 3; i++) { base.action.AddActionDelegate(() => base.CreateBulletOverride(Vector3.zero, 0f)); if (i < 2) { base.action.AddActionWait(0.1f); } } } }
protected override void OnInit() { switch (this.mWeight.GetRandom()) { case 0: base.AddAction(base.GetActionAttack(string.Empty, 0x1404, true)); base.AddActionWait(1f); break; case 1: for (int i = 0; i < this.movecount; i++) { base.AddAction(this.GetActionMoveOne(200, 200)); } base.AddActionWait(1f); if (MathDxx.RandomBool()) { base.AddActionWait(0.5f); for (int j = 0; j < this.movecount; j++) { base.AddAction(this.GetActionMoveOne(200, 200)); } base.AddActionWait(1f); } break; case 2: for (int i = 0; i < 3; i++) { base.AddAction(base.GetActionAttackWait(0x1407, 100, 100)); } base.AddActionWait(0.5f); break; } base.bReRandom = true; }
private void update_touch() { if (Input.GetKeyUp(KeyCode.P)) { this.bPause = !this.bPause; GameLogic.SetPause(this.bPause); } if (Input.GetKeyUp(KeyCode.F)) { CameraControlM.CameraFollow = !CameraControlM.CameraFollow; } if (Input.GetKeyUp(KeyCode.T)) { this.buy_gold(); } if (Input.GetKeyUp(KeyCode.V)) { List <Drop_DropModel.DropData> list = new List <Drop_DropModel.DropData>(); Drop_DropModel.DropData item = new Drop_DropModel.DropData { type = PropType.eCurrency, id = 1, count = 0x7d0 }; list.Add(item); item = new Drop_DropModel.DropData { type = PropType.eCurrency, id = 2, count = 100 }; list.Add(item); item = new Drop_DropModel.DropData { type = PropType.eCurrency, id = 3, count = 10 }; list.Add(item); item = new Drop_DropModel.DropData { type = PropType.eCurrency, id = 4, count = 3 }; list.Add(item); if (MathDxx.RandomBool()) { item = new Drop_DropModel.DropData { type = PropType.eEquip, id = 0xfdee5, count = 1 }; list.Add(item); item = new Drop_DropModel.DropData { type = PropType.eEquip, id = 0xfdee6, count = 1 }; list.Add(item); item = new Drop_DropModel.DropData { type = PropType.eEquip, id = 0x7595, count = 5 }; list.Add(item); item = new Drop_DropModel.DropData { type = PropType.eEquip, id = 0x7597, count = 10 }; list.Add(item); } WindowUI.ShowRewardSimple(list); } }
protected override void OnInit() { AIBase.ActionSequence sequence; AIBase.ActionSequence sequence2; this.ran = this.mWeightRandom.GetRandom(); switch (this.ran) { case 0: sequence2 = new AIBase.ActionSequence { name = "actionseq", m_Entity = base.m_Entity }; sequence = sequence2; if (!MathDxx.RandomBool()) { sequence.AddAction(base.GetActionAttack("attack", 0x13d2, true)); break; } sequence.AddAction(base.GetActionAttack("attack", 0x13d1, true)); break; case 1: { sequence2 = new AIBase.ActionSequence { name = "actionseq", m_Entity = base.m_Entity }; AIBase.ActionSequence action = sequence2; action.AddAction(base.GetActionDelegate(delegate { base.m_Entity.mAniCtrlBase.UpdateAnimationSpeed("AttackPrev", 2f); base.m_Entity.mAniCtrlBase.UpdateAnimationSpeed("AttackEnd", 2f); })); int num2 = GameLogic.Random(4, 9); int num3 = GameLogic.Random(0, 2); for (int i = 0; i < num2; i++) { int attackId = 0x13d3 + num3; num3 = 1 - num3; action.AddAction(base.GetActionAttack("attack", attackId, true)); } action.AddAction(base.GetActionDelegate(delegate { base.m_Entity.mAniCtrlBase.UpdateAnimationSpeed("AttackPrev", -2f); base.m_Entity.mAniCtrlBase.UpdateAnimationSpeed("AttackEnd", -2f); })); action.AddAction(base.GetActionWaitRandom("actionwait", 500, 0x3e8)); base.AddAction(action); goto Label_01F2; } case 2: base.AddAction(this.GetActionMoveOne(500, 0x5dc)); goto Label_01F2; case 3: base.AddAction(new AIMove1054(base.m_Entity)); base.AddAction(base.GetActionWaitRandom(string.Empty, 500, 800)); base.AddAction(new AIMove1054(base.m_Entity)); base.AddAction(base.GetActionWaitRandom(string.Empty, 500, 800)); goto Label_01F2; default: goto Label_01F2; } sequence.AddAction(base.GetActionWaitRandom("actionwait", 500, 0x3e8)); base.AddAction(sequence); Label_01F2: base.bReRandom = true; }