Example #1
0
 public void follow(Player p)
 {
     float angle = findAngle(p.Position);
     mRotation = angle;
 }
 public void createPlayer()
 {
     player = new Player();
     //gameObjectList.Add(player);
 }
Example #3
0
 //update method for enemy
 //--I chose initially to handle everything with a random feel just for simplicity's sake
 public void Update(GameTime theGameTime, Player p)
 {
     Random gen = new Random();  //init random gen, time based seed
     //UpdateMovement(gen);        //run the movement method with the generator
     UpdateProjectileV2(theGameTime, gen); //same thing, but for the ProjectileV2s
     follow(p);
     base.Update(theGameTime, mSpeed, mRotation);
 }