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