Server.GameObject.outOfBounds C# (CSharp) 메소드

outOfBounds() 공개 메소드

public outOfBounds ( ) : void
리턴 void
        public virtual void outOfBounds()
        {
            if (x < 0)
            {
                this.speedX = this.speedX * (float)(-0.1);
                this.x = 0;
            }
            else if (x > MatchConfig.mapWidth)
            {
                this.speedX = this.speedX * (float)(-0.1);
                this.x = MatchConfig.mapWidth;
            }
            if (y < 0)
            {
                this.speedY = this.speedY * (float)(-0.1);
                this.y = 0;
            }
            else if (y > MatchConfig.mapHeight)
            {
                this.speedY = this.speedY * (float)(-0.1);
                this.y = MatchConfig.mapHeight;
            }
        }