public PlayerAirSpeedCtrlBehaviorEntryGravity() { Value = 1.0f; Segments = new SegmentSelector { Index = "*" }; }
public PlayerGroundSpeedCtrlBehaviorEntryFriction() { Value = 0.2f; Segments = new SegmentSelector { Index = "*" }; }
private static void Main() { var p1 = new Polygon { Regions = new List <Region> { new Region { Points = new List <Point> { new Point(0, 0), new Point(16, 0), new Point(8, 8) } } } }; var p2 = new Polygon { Regions = new List <Region> { new Region { Points = new List <Point> { new Point(16, 6), new Point(8, 14), new Point(0, 6), } } } }; var unified = SegmentSelector.Union(p1, p2); Console.WriteLine(unified); }
public void Open(string path) { _path = path; _doc = new XmlDocument(); _doc.Load(path); _doc.PreserveWhitespace = true; _nsmgr = new XmlNamespaceManager(_doc.NameTable); _nsmgr.AddNamespace("o", "urn:oasis:names:tc:xliff:document:1.2"); _nsmgr.AddNamespace("s", "http://sdl.com/FileTypes/SdlXliff/1.0"); _nsmgr.AddNamespace("sdl", "http://sdl.com/FileTypes/SdlXliff/1.0"); _commenter = new CommentHandler(_doc, _nsmgr); _locker = new LockHandler(_doc, _nsmgr, _commenter); _selector = new SegmentSelector(_doc, _nsmgr, _commenter, _locker); _selector.GetContext = true; }
public void LoadMediaFile(StorageFile file) { IRandomAccessStream stream = file.OpenReadAsync().AsTask().Result; if (stream == null) { ShowMessageDialog(StringLoader.Get("Invalid_Media_File")); return; } sourceFile = file; mediaFileInfo = new MediaFileInfo(sourceFile); if (UpdateMediaInfo(mediaFileInfo) == false) { ShowMessageDialog(StringLoader.Get("Invalid_Media_File")); mediaFileInfo = null; sourceFile = null; stream.Dispose(); stream = null; return; } Preview.SetSource(stream, sourceFile.ContentType); Stop(); double width = this.ActualWidth; double height = this.ActualHeight; Preview.Width = width; Preview.Height = height; SegmentSelector.Width = (width); SegmentSelector.Reset(); Canvas.SetTop(SegmentSelector, height - 100); }
private static void Main() { var poly1 = new Polygon { Regions = new List <Region> { new Region { Points = new List <Point> { new Point(200L, 50L), new Point(600L, 50L), new Point(600L, 150L), new Point(200L, 150L) } } } }; var poly2 = new Polygon { Regions = new List <Region> { new Region { Points = new List <Point> { new Point(300L, 150L), new Point(500L, 90L), new Point(500L, 200L), new Point(300L, 200L) } } } }; var seg1 = Polybool.Net.Logic.PolyBool.Segments(poly1); var seg2 = Polybool.Net.Logic.PolyBool.Segments(poly2); var comb = Polybool.Net.Logic.PolyBool.Combine(seg1, seg2); var seg3 = SegmentSelector.Difference(comb); var pol = Polybool.Net.Logic.PolyBool.Polygon(seg3); Console.WriteLine(pol); }
public UpdateEffectBehavior() { Segments = new SegmentSelector { Index = "*" }; }
public StartSegmentEffectBehavior() { Segments = new SegmentSelector { Index = "0" }; }