Server.Player.treatCollision C# (CSharp) Méthode

treatCollision() public méthode

In case a collison is detected, this function should be called to treat how a player instance will respond in collison with another object
public treatCollision ( Planets object2 ) : void
object2 Planets An instance to a Planets
Résultat void
        public void treatCollision(Planets object2)
        {
            if (object2 is Planets)
            {
                this.speedX = this.speedX * (float)(-0.25);
                this.speedY = this.speedY * (float)(-0.25);
            }
        }

Same methods

Player::treatCollision ( Player object2 ) : void