collision algo with Hugo
+ ball.dir added to EventGameUpdate
This commit is contained in:
@@ -26,9 +26,19 @@ class EventMatchmakingComplete extends ServerEvent {
|
||||
}
|
||||
|
||||
class EventGameUpdate extends ServerEvent {
|
||||
playerLeft = {y: 0};
|
||||
playerRight = {y: 0};
|
||||
ball = {x: 0, y: 0, speed: 0};
|
||||
playerLeft = {
|
||||
y: 0
|
||||
};
|
||||
playerRight = {
|
||||
y: 0
|
||||
};
|
||||
ball = {
|
||||
x: 0,
|
||||
y: 0,
|
||||
dirX: 0,
|
||||
dirY: 0,
|
||||
speed: 0
|
||||
};
|
||||
lastInputId = 0;
|
||||
constructor() { // TODO: constructor that take GameComponentsServer maybe ?
|
||||
super(en.EventTypes.gameUpdate);
|
||||
|
||||
Reference in New Issue
Block a user