Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     ActivatePauseMenu();
     rO         = FindObjectOfType <RandomOperator>();
     loadCircle = FindObjectOfType <LoadingScript>();
     //randomNumberGen = FindObjectsOfType<RandomNumberGenerator>();
     speed       = speedArray[index];
     points.text = pointsValue.ToString();
     streakMeter.SetStreakText("X1");
 }
 public SubscriptionConstraint Generate()
 {
     if (RandomValueWithTarget.NextTargetMiss())
     {
         return(null);
     }
     return(new SubscriptionConstraint
     {
         Name = Field.FieldName,
         Operator = (string)RandomOperator.NextObject(),
         Value = RandomValue.NextObject(),
     });
 }
Beispiel #3
0
 /// <summary>
 /// Konstruktor wysyoływany w przypadku ładownaia nowej gry
 /// </summary>
 /// <param name="tile_size">rozmiar komórki mapy</param>
 /// <param name="width">szerokosc mapy</param>
 /// <param name="height">wysokosc mapy</param>
 /// <param name="content">XNA Content</param>
 /// <param name="player">instancja gracza</param>
 /// <param name="vandal">instancja Vandala</param>
 /// <param name="gameLevel">poziom gry</param>
 public Map(int tile_size, int width, int height, ContentManager content, Player player,  int gameLevel = 1)
 {
     this.player = player;
     this.gameLevel = gameLevel;
     this.content = content;
     this.width = width;
     this.height = height;
     this.player = player;
     this.tile_size = tile_size;
     objects = new MapObject[width, height];
     random_operator = new RandomOperator(width, height);
     random_operator.GenerateRandomMap(width, height, gameLevel);
     CovertIntToObjects(ref objects, random_operator.Map);
 }