Server.PowerUp.randomizePosition C# (CSharp) 메소드

randomizePosition() 공개 메소드

public randomizePosition ( ) : void
리턴 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);
        }