mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 21:12:53 +02:00
wand changes
This commit is contained in:
parent
2cb875e40d
commit
81358b7f14
1 changed files with 17 additions and 3 deletions
|
@ -40,12 +40,26 @@
|
||||||
|
|
||||||
var _this;
|
var _this;
|
||||||
|
|
||||||
|
function interval() {
|
||||||
|
var lastTime = new Date().getTime() / 1000;
|
||||||
|
|
||||||
|
return function getInterval() {
|
||||||
|
var newTime = new Date().getTime() / 1000;
|
||||||
|
var delta = newTime - lastTime;
|
||||||
|
lastTime = newTime;
|
||||||
|
return delta;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var checkInterval = interval();
|
||||||
|
|
||||||
|
|
||||||
var BubbleWand = function() {
|
var BubbleWand = function() {
|
||||||
_this = this;
|
_this = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
BubbleWand.prototype = {
|
BubbleWand.prototype = {
|
||||||
timePassed:null,
|
timePassed: null,
|
||||||
currentBubble: null,
|
currentBubble: null,
|
||||||
preload: function(entityID) {
|
preload: function(entityID) {
|
||||||
this.entityID = entityID;
|
this.entityID = entityID;
|
||||||
|
@ -56,7 +70,7 @@
|
||||||
Script.update.disconnect(this.update);
|
Script.update.disconnect(this.update);
|
||||||
},
|
},
|
||||||
update: function(deltaTime) {
|
update: function(deltaTime) {
|
||||||
this.timePassed=deltaTime;
|
this.timePassed = deltaTime;
|
||||||
var defaultGrabData = {
|
var defaultGrabData = {
|
||||||
activated: false,
|
activated: false,
|
||||||
avatarId: null
|
avatarId: null
|
||||||
|
@ -220,7 +234,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
continueNearGrab: function() {
|
continueNearGrab: function() {
|
||||||
|
print('time passed:::' + checkInterval());
|
||||||
if (this.timePassed === null) {
|
if (this.timePassed === null) {
|
||||||
this.timePassed = Date.now();
|
this.timePassed = Date.now();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue