コード例 #1
0
 public clsPathNode(Vector2 squareLocation, clsWorld world, Vector2 startSquareLocation, Vector2 endSquareLocation)
 {
     this.world               = world;
     this.squareLocation      = squareLocation;
     this.startSquareLocation = startSquareLocation;
     this.endSquareLocation   = endSquareLocation;
 }
コード例 #2
0
        /*****************************************
        *       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);
        }
コード例 #3
0
        /*****************************************
        *       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);
        }
コード例 #4
0
        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;
            }
        }
コード例 #5
0
 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;
 }