merge part 1 / 2
parent
18ac3ac1c3
commit
51ba9a855d
|
@ -17,9 +17,9 @@ if (typeof Q == 'undefined') {
|
||||||
|
|
||||||
if (typeof _ == 'undefined') {
|
if (typeof _ == 'undefined') {
|
||||||
if (typeof require == 'undefined') {
|
if (typeof require == 'undefined') {
|
||||||
console.warn('You need the lowdash library for the GameLib.D3');
|
console.warn('You need the lodash library for the GameLib.D3');
|
||||||
throw new Error('You need the lowdash library for the GameLib.D3');
|
throw new Error('You need the lodash library for the GameLib.D3');
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ = require('_');
|
var _ = require('lodash');
|
||||||
}
|
}
|
|
@ -1,10 +1,16 @@
|
||||||
GameLib.D3.ComponentColorLerp = function(
|
GameLib.D3.ComponentColorLerp = function(
|
||||||
componentId,
|
id,
|
||||||
|
name,
|
||||||
startColor,
|
startColor,
|
||||||
endColor,
|
endColor,
|
||||||
lerpSpeed
|
lerpSpeed
|
||||||
) {
|
) {
|
||||||
this.componentId = componentId || GameLib.D3.Tools.RandomId();
|
this.id = id|| GameLib.D3.Tools.RandomId();
|
||||||
|
if (typeof name == 'undefined') {
|
||||||
|
name = this.constructor.name;
|
||||||
|
}
|
||||||
|
this.name = name;
|
||||||
|
|
||||||
this.parentEntity = null;
|
this.parentEntity = null;
|
||||||
|
|
||||||
// Todo: this should be executed somewhere in game-lib-z, so that we don't execute it on every construction of an object.
|
// Todo: this should be executed somewhere in game-lib-z, so that we don't execute it on every construction of an object.
|
||||||
|
|
|
@ -1,14 +1,21 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param componentId
|
* @param id
|
||||||
|
* @param name
|
||||||
* @param physicsWorld
|
* @param physicsWorld
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
GameLib.D3.ComponentVehicleAIObjectAvoidance = function(
|
GameLib.D3.ComponentVehicleAIObjectAvoidance = function(
|
||||||
componentId,
|
id,
|
||||||
|
name,
|
||||||
physicsWorld
|
physicsWorld
|
||||||
) {
|
) {
|
||||||
this.componentId = componentId || GameLib.D3.Tools.RandomId();
|
this.id = id|| GameLib.D3.Tools.RandomId();
|
||||||
|
if (typeof name == 'undefined') {
|
||||||
|
name = this.constructor.name;
|
||||||
|
}
|
||||||
|
this.name = name;
|
||||||
|
|
||||||
this.parentEntity = null;
|
this.parentEntity = null;
|
||||||
GameLib.D3.Utils.Extend(GameLib.D3.ComponentVehicleAIObjectAvoidance, GameLib.D3.ComponentInterface);
|
GameLib.D3.Utils.Extend(GameLib.D3.ComponentVehicleAIObjectAvoidance, GameLib.D3.ComponentInterface);
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,23 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param componentId
|
* @param id
|
||||||
|
* @param name
|
||||||
* @param targetEntity GameLib.D3.Entity
|
* @param targetEntity GameLib.D3.Entity
|
||||||
* @param nodePath
|
* @param nodePath
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
GameLib.D3.ComponentVehicleAIPathBoid = function(
|
GameLib.D3.ComponentVehicleAIPathBoid = function(
|
||||||
componentId,
|
id,
|
||||||
|
name,
|
||||||
targetEntity,
|
targetEntity,
|
||||||
nodePath
|
nodePath
|
||||||
) {
|
) {
|
||||||
this.componentId = componentId || GameLib.D3.Tools.RandomId();
|
this.id = id|| GameLib.D3.Tools.RandomId();
|
||||||
|
if (typeof name == 'undefined') {
|
||||||
|
name = this.constructor.name;
|
||||||
|
}
|
||||||
|
this.name = name;
|
||||||
|
|
||||||
this.parentEntity = null;
|
this.parentEntity = null;
|
||||||
GameLib.D3.Utils.Extend(GameLib.D3.ComponentVehicleAIPathBoid, GameLib.D3.ComponentInterface);
|
GameLib.D3.Utils.Extend(GameLib.D3.ComponentVehicleAIPathBoid, GameLib.D3.ComponentInterface);
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,25 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param componentId
|
* @param id
|
||||||
|
* @param name
|
||||||
* @param targetEntity GameLib.D3.Entity
|
* @param targetEntity GameLib.D3.Entity
|
||||||
* @param steeringSpeed
|
* @param steeringSpeed
|
||||||
* @param maxSteerAngle
|
* @param maxSteerAngle
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
GameLib.D3.ComponentVehicleAIPathSteering = function(
|
GameLib.D3.ComponentVehicleAIPathSteering = function(
|
||||||
componentId,
|
id,
|
||||||
|
name,
|
||||||
targetEntity,
|
targetEntity,
|
||||||
steeringSpeed,
|
steeringSpeed,
|
||||||
maxSteerAngle
|
maxSteerAngle
|
||||||
) {
|
) {
|
||||||
this.componentId = componentId || GameLib.D3.Tools.RandomId();
|
this.id = id|| GameLib.D3.Tools.RandomId();
|
||||||
|
if (typeof name == 'undefined') {
|
||||||
|
name = this.constructor.name;
|
||||||
|
}
|
||||||
|
this.name = name;
|
||||||
|
|
||||||
this.parentEntity = null;
|
this.parentEntity = null;
|
||||||
|
|
||||||
// Todo: this should be executed somewhere in game-lib-z, so that we don't execute it on every construction of an object.
|
// Todo: this should be executed somewhere in game-lib-z, so that we don't execute it on every construction of an object.
|
||||||
|
|
Loading…
Reference in New Issue