public HeavyweightLine(SceneMgr mgr, long id, Vector start, Vector end, Color color, int width) : base(mgr, id) { SceneMgr = mgr; Start = start; End = end; SceneMgr.BeginInvoke(new Action(() => { HeavyWeightGeometry = HeavyweightGeometryFactory.CreateLineGeometry(Start, End, color, width); BlurEffect effect = new BlurEffect(); effect.Radius = 6; effect.KernelType = KernelType.Box; HeavyWeightGeometry.Effect = effect; })); }
public void ShowForceFieldEffect() { ForcePullField f = new ForcePullField(me.SceneMgr, IdMgr.GetNewId(hook.Owner.GetId())); f.Radius = (int)hook.Owner.Data.HookActivePullReachDistance; f.Position = new Vector(me.Center.X - f.Radius, me.Center.Y - f.Radius); f.HeavyWeightGeometry = HeavyweightGeometryFactory.CreateForceField(f); f.AddControl(new CenterCloneControl(me)); float life = 0.3f; // seconds f.AddControl(new LimitedLifeControl(life)); f.AddControl(new ShrinkingControl(0, life)); me.SceneMgr.DelayedAttachToScene(f); }