Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/WayPoint.js
function WayPoint() {} | |||||
WayPoint.prototype.Schema = "<a:component/><empty/>"; | |||||
WayPoint.prototype.Init = function() | |||||
{ | |||||
this.positions = []; | |||||
}; | |||||
WayPoint.prototype.Stack = function(x, z) | |||||
{ | |||||
this.positions.push({ | |||||
'x': x, | |||||
'z': z | |||||
}); | |||||
}; | |||||
WayPoint.prototype.GetPositions = function() | |||||
{ | |||||
return this.positions; | |||||
}; | |||||
WayPoint.prototype.Unset = function() | |||||
{ | |||||
this.positions = []; | |||||
}; | |||||
WayPoint.prototype.Shift = function() | |||||
{ | |||||
this.positions.shift(); | |||||
}; | |||||
Engine.RegisterComponentType(IID_WayPoint, "WayPoint", WayPoint); |
Wildfire Games · Phabricator