Server.PowerUp.randomizePosition C# (CSharp) Méthode

randomizePosition() public méthode

public randomizePosition ( ) : void
Résultat void
        public void randomizePosition()
        {
            //Randomly place the powerup somewhere within the map boundaries
            Random random = new Random();
            this.x = random.Next(this.radius, MatchConfig.mapWidth+1-this.radius);
            this.y = random.Next(this.radius, MatchConfig.mapHeight+1-this.radius);
        }