Differential D981 Diff 8352 ps/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | AddMock(entity, IID_Position, { | ||||
"MoveTo": () => {} | "MoveTo": () => {} | ||||
}); | }); | ||||
AddMock(target, IID_Position, { | AddMock(target, IID_Position, { | ||||
"IsInWorld": () => true, | "IsInWorld": () => true, | ||||
"GetPosition2D": () => { return { "x": 100, "y": 200 }; } | "GetPosition2D": () => { return { "x": 100, "y": 200 }; } | ||||
}); | }); | ||||
TS_ASSERT_EQUALS(cmpUnitMotionFlying.IsInTargetRange(target, 10, 112), true); | |||||
TS_ASSERT_EQUALS(cmpUnitMotionFlying.IsInTargetRange(target, 50, 111), false); | |||||
TS_ASSERT_EQUALS(cmpUnitMotionFlying.IsInTargetRange(target, 112, 200), false); | |||||
AddMock(entity, IID_GarrisonHolder, { | AddMock(entity, IID_GarrisonHolder, { | ||||
"AllowGarrisoning": () => {} | "AllowGarrisoning": () => {} | ||||
}); | }); | ||||
AddMock(entity, IID_Health, { | AddMock(entity, IID_Health, { | ||||
}); | }); | ||||
AddMock(entity, IID_RangeManager, { | AddMock(entity, IID_RangeManager, { | ||||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator