public clsPathNode(Vector2 squareLocation, clsWorld world, Vector2 startSquareLocation, Vector2 endSquareLocation) { this.world = world; this.squareLocation = squareLocation; this.startSquareLocation = startSquareLocation; this.endSquareLocation = endSquareLocation; }
/***************************************** * Instance Game Intelegence hooks *****************************************/ public clsDriverHuman createDriverHuman(clsWorld world, clsCar car, clsInput input) { clsDriverHuman human = new clsDriverHuman(world, car, input); // assign human to it actors.Add((intActor)human); return(human); }
/***************************************** * Instance Objects in the world *****************************************/ public clsDriverHuman spawnCarLocalHuman(clsWorld world, Vector2 worldLocation, Vector2 direction, Vector2 velocity) { clsCar car = createCar(worldLocation, direction, velocity); // spanw car clsDriverHuman human = createDriverHuman(world, car, this.input); // create human for the car return(human); }
clsPathFinding(clsWorld world, Vector2 startSquareLocation, Vector2 endSquareLocation) { // get start then connections and process like video clsPathNode startNode = new clsPathNode(startSquareLocation, world, startSquareLocation, endSquareLocation); startNode.status = PathNodeStatus.procesed; // get connected nodes List <clsPathNode> connectedNodes = startNode.getPossiblePathNodes(); foreach (clsPathNode pathNode in connectedNodes) { pathNode.status = PathNodeStatus.procesed; } }
public clsDriverHuman(clsWorld world, clsCar car, clsInput input) : base(world, car) { // could have an input that is network at some point this.car = car; this.input = input; }