This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// QuadTreeNode.cpp | |
// | |
// Created by Tomas Basham on 15/03/2014. | |
// Copyright (c) 2014 tomasbasham.co.uk. All rights reserved. | |
// | |
#include <iostream> | |
#include "QuadTree.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Copyright © 2008-2013 Pioneer Developers. See AUTHORS.txt for details | |
-- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt | |
local scannedShips | |
local ships = {} | |
local maxships = 200 | |
local killSomething = function(ship) | |
-- scan for ships and exclude itself and player, so we can just watch. | |
scannedShips = Space.GetBodies(function (body) return body:isa("Ship") and body ~= ship and body~=Game.player end) | |
if #scannedShips > 0 then |