Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Lines | function TestMoveIntoFormationWhileAttacking() | ||||
AddMock(controller, IID_Position, { | AddMock(controller, IID_Position, { | ||||
GetTurretParent: function() { return INVALID_ENTITY; }, | GetTurretParent: function() { return INVALID_ENTITY; }, | ||||
JumpTo: function(x, z) { this.x = x; this.z = z; }, | JumpTo: function(x, z) { this.x = x; this.z = z; }, | ||||
GetPosition: function() { return new Vector3D(this.x, 0, this.z); }, | GetPosition: function() { return new Vector3D(this.x, 0, this.z); }, | ||||
GetPosition2D: function() { return new Vector2D(this.x, this.z); }, | GetPosition2D: function() { return new Vector2D(this.x, this.z); }, | ||||
GetRotation: function() { return { "y": 0 }; }, | GetRotation: function() { return { "y": 0 }; }, | ||||
IsInWorld: function() { return true; }, | IsInWorld: function() { return true; }, | ||||
MoveOutOfWorld: () => {} | |||||
Stan: I guess you can use arrow functions everywhere since you changed the lines? or is the this… | |||||
Done Inline Actionsthe this is problematic. wraitii: the this is problematic. | |||||
}); | }); | ||||
AddMock(controller, IID_UnitMotion, { | AddMock(controller, IID_UnitMotion, { | ||||
"GetWalkSpeed": () => 1, | "GetWalkSpeed": () => 1, | ||||
"SetSpeedMultiplier": (speed) => {}, | "SetSpeedMultiplier": (speed) => {}, | ||||
"MoveToPointRange": (x, z, minRange, maxRange) => {}, | "MoveToPointRange": (x, z, minRange, maxRange) => {}, | ||||
"StopMoving": () => {}, | "StopMoving": () => {}, | ||||
"SetFacePointAfterMove": () => {}, | "SetFacePointAfterMove": () => {}, | ||||
Show All 34 Lines |
Wildfire Games · Phabricator
I guess you can use arrow functions everywhere since you changed the lines? or is the this problematic?