начать 4.0
This commit is contained in:
19
4.0/игра/120.Физика.js
Normal file
19
4.0/игра/120.Физика.js
Normal file
@@ -0,0 +1,19 @@
|
||||
function Физика()
|
||||
{
|
||||
this.создать = function()
|
||||
{
|
||||
this.движок = Matter.Engine.create({
|
||||
enableSleeping: true,
|
||||
gravity: {
|
||||
y: 2,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
this.обновить = function() {
|
||||
Matter.Engine.update(this.движок);
|
||||
};
|
||||
|
||||
// Конструктор.
|
||||
this.создать();
|
||||
}
|
||||
Reference in New Issue
Block a user