game: core: use server game calulation form
This commit is contained in:
@ -2,13 +2,13 @@
|
||||
|
||||
class Ball
|
||||
{
|
||||
constructor(game)
|
||||
constructor(game, position_x, position_y, velocity_x, velocity_y)
|
||||
{
|
||||
this.game = game;
|
||||
this.position_x = game.config.size_x / 2;
|
||||
this.position_y = game.config.size_y / 2;
|
||||
this.velocity_x = game.config.ball_speed_start;
|
||||
this.velocity_y = game.config.ball_speed_start;
|
||||
this.position_x = position_x;
|
||||
this.position_y = position_y;
|
||||
this.velocity_x = velocity_x;
|
||||
this.velocity_y = velocity_y;
|
||||
}
|
||||
|
||||
_collision(old_pos_x, old_pos_y, new_pos_x, new_pos_y)
|
||||
|
Reference in New Issue
Block a user