public void onActorLocationChanged(BoardActor boardActor, Point newLocation) { // give our actor a new position in the quad tree actors.Remove(boardActor, boardActor.getBounds()); boardActor.location = newLocation; actors.Add(boardActor, boardActor.getBounds()); }
public void addActor(BoardActor ba) { if (ba != null) { actors.Add(ba, ba.getBounds()); ba.setBoard(this); } onBoardChanged(); }
public BoardActor createActor(int x, int y, String filename, AssetDetails argDetails) { BoardActor r = null; if (dispatcher != null) { r = new BoardActor(x, y, filename); r.loadAsset(filename, dispatcher, argDetails); } else { Logger.log("SceneManager: Warning - board actor creation failed, no dispatcher set", LEVEL.WARNING); } return(r); }
public BoardActor getTopActorAt(Point p) { BoardActor r = null; List <BoardActor> actorlist = actors.getObjectsAt(p); if (actorlist != null) { try { foreach (BoardActor ba in actorlist) { if (ba.isAt(p)) { r = ba; } } } catch (InvalidOperationException e) { Console.WriteLine("Error Board::getActorAt: " + e.Message); } } return(r); }
public void deleteActor(BoardActor ba) { actors.Remove(ba, ba.getBounds()); ba.setBoard(null); onBoardChanged(); }
public SceneActorLoadAssetEvent(BoardActor ba, AssetDetails at) { actor = ba; details = at; }
public SceneActorLoadAssetEvent() { actor = null; details = new AssetDetails(AssetType.IMAGE); }