Esempio n. 1
0
 Vector2 RandomSet(bool firstGen = false)
 {
     if (firstGen)
     {
         return(new Vector2(Asteroids.GetIntRnd(0, Asteroids.screenWidth), Asteroids.GetIntRnd(0, Asteroids.screenHeight)));
     }
     else
     {
         return(new Vector2(Asteroids.GetIntRnd(Asteroids.screenWidth, Asteroids.screenWidth + 300), Asteroids.GetIntRnd(0, Asteroids.screenHeight)));
     }
 }
Esempio n. 2
0
 public void StarShipCollide(Vector2 StarShipDir)
 {
     //Pos.X += 10;
     //Dir.X = -Dir.X;
     //Dir.Y = Asteroids.GetIntRnd(1, 5);
     if (StarShipDir.X == 0)
     {
         Dir.X = -Dir.X;
     }
     else
     {
         Dir.X = StarShipDir.X / 2;
     }
     if (StarShipDir.Y == 0)
     {
         Dir.Y = Asteroids.GetIntRnd(-3, 3);
     }
     else
     {
         Dir.Y = StarShipDir.Y / 2;
     }
 }
Esempio n. 3
0
 Vector2 RandomSet()
 {
     return(new Vector2(Asteroids.GetIntRnd(Asteroids.screenWidth, Asteroids.screenWidth + 300), Asteroids.GetIntRnd(frameWidth, Asteroids.screenHeight - frameWidth)));
 }