private void addMaskCollision() { if (isCollisionOnList()) { return; } Representor tempRep = representor.Instance() as Representor; collisionContainer.AddChild(tempRep); tempRep.setNumber(collisionValue.ToString()); colValues.Add(collisionValue); Button remove = tempRep.GetChild(0) as Button; object[] obj = new object[1]; obj[0] = collisionValue; remove.Connect("pressed", this, nameof(removeCollisionLayer), obj); collisions++; owner.SetCollisionMaskBit((int)collisionValue, true); }
private void addMaskLayer() { if (isLayerOnList()) { return; } Representor tempRep = representor.Instance() as Representor; layerContainer.AddChild(tempRep); tempRep.setNumber(layerValue.ToString()); layerValues.Add(layerValue); Button remove = tempRep.GetChild(0) as Button; object[] obj = new object[1]; obj[0] = layerValue; remove.Connect("pressed", this, nameof(removeMaskLayer), obj); masks++; owner.SetCollisionLayerBit((int)layerValue, true); }
public void Configuration(IAppBuilder app) { var representors = new Representor <SemanticDocument>[] { new Siren.SirenRepresentor(), new SirenServerSideHtmlRepresentor(), //new SirenReactHtmlRepresentor() }; var taskListAppRoot = BuildTaskListAppRoot(new Uri("/tasks", UriKind.Relative)); app.ExposeRootNodeAsHypermediaApi(taskListAppRoot, LocateAdaptors, representors); var chessAppRoot = new ChessEngineApp("ChessEngine", new Uri("/chess", UriKind.Relative), TermFactory.From <ChessEngineApp>()); app.ExposeRootNodeAsHypermediaApi(chessAppRoot, LocateAdaptors, representors); var indexAppRoot = new IndexRootNode("Index", new Uri("/", UriKind.Relative)); indexAppRoot.AddLink("chess engine app", chessAppRoot.Uri, TermFactory.From <ChessEngineApp>()); indexAppRoot.AddLink("task list app", taskListAppRoot.Uri, TermFactory.From <TaskListAppRoot>()); app.ExposeRootNodeAsHypermediaApi(indexAppRoot, LocateAdaptors, representors); }