private void SceneWelcome_MouseDown(object sender, MouseEventArgs e) { EffectObjects.Add(new EffectShark(Sec(0.8F), 10)); int ex = e.X; int ey = e.Y; for (int i = 0; i < GameObjects.Count; i++) { ObjectActive objectActive = GameObjects[i] as ObjectActive; if (objectActive != null) { double distance = Function.GetDistance(e.X, e.Y, objectActive.Layout.CenterX, objectActive.Layout.CenterY); if (distance < 100) { //objectActive.Life.Value = 0; //objectActive.Life.Limit = Sec(0.05F); objectActive.Propertys.Add(new PropertyDeadBroken(5, 2, 2, ObjectDeadType.Collision, 360, 200, 400, Sec(0.8F), Sec(1.4F))); objectActive.Kill(null, ObjectDeadType.Collision); } else { double angle = Function.GetAngle(e.X, e.Y, objectActive.Layout.CenterX, objectActive.Layout.CenterY); PointF targetPoint = Function.GetOffsetPoint(objectActive.Layout.CenterX, objectActive.Layout.CenterY, angle, Width + Height); objectActive.MoveObject.Target.SetObject(new PointObject(targetPoint)); objectActive.Propertys.Add(new PropertyFreeze(Sec(0.1F + (float)Global.Rand.NextDouble() * 0.2F))); } //objectActive.Speed *= 2; } } _TimerOfEnter.Enabled = true; }
/// <summary> /// 技能失效 /// </summary> public override void DoAfterEnd(SkillEndType endType) { switch (endType) { case SkillEndType.ChanneledBreak: { _ShieldObject.Kill(null, ObjectDeadType.LifeEnd); _MiniBar.Break(); } break; case SkillEndType.Finish: { _ShieldObject.Kill(null, ObjectDeadType.LifeEnd); _MiniBar.Break(); } break; } base.DoAfterEnd(endType); }