Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void UserMove(RoomUser User)
- {
- if (User == null || this.Balls.Count == 0)
- return;
- foreach (RoomItem ball in this.Balls)
- {
- if (ball.GetX == User.X && ball.GetY == User.Y && (User.GoalX != ball.GetX || User.GoalY != ball.GetY))
- {
- ball.Direction = this.InverseDir(this.IntToDirection(Rotation.Calculate(User.X, User.Y, User.GoalX, User.GoalY)));
- ball.rebound = true;
- this.KickShotBall(User, ball);
- }
- if (ball.isKicked && ball.rebounds > 0)
- {
- if (ball.GetX == User.X || ball.GetY == User.Y)
- this.Room.SetFloorItem((GameClient) null, ball, User.X, User.Y, 0, false, true, true);
- this.ResetBall(ball);
- ball.Direction = this.InverseDir(this.IntToDirection(Rotation.Calculate(User.X, User.Y, User.GoalX, User.GoalY)));
- ball.rebound = true;
- this.KickShotBall(User, ball);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement