Guest User

Untitled

a guest
Apr 11th, 2013
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Game.IntroPlayerAI = function(units, waypoints) {
  2.     // 'units' is an array of all the units in the game including your units and your enemies units.
  3.     // Each unit has an 'isEnemy' property.  You can use this to determine which ships are yours and which
  4.     // belong to your enemy.
  5.  
  6.     // 'waypoints' is an array of waypoints in the game.
  7.     // Each waypoint has a 'reached' property.  You can use this to find waypoints that you need to go to.
  8.    
  9.     // In order to make our ship do anything, you must return from this function an array of Command s.
  10.     // A command is created with a ship and a target.
  11.     // For example:
  12.     //    return [new Command(playerShip, new AttackInstruction(enemyShip))];
  13.     // or
  14.     //    return [new Command(playerShip, new MoveInstruction(waypoint))];
  15.     // assuming that the variable 'playerShip' is a player owned ship, 'enemyShip' is an enemy ship, and
  16.     // 'waypoint' is a waypoint.
  17. }
Advertisement
Add Comment
Please, Sign In to add comment