public override bool Tick(Actor self) { var nextPosition = self.CenterPosition - fallVector; if (nextPosition.Z < groundLevel) { return(true); } pos.SetCenterPosition(self, nextPosition); return(false); }
public override bool Tick(Actor self) { currentPosition -= fallVector; pos.SetCenterPosition(self, currentPosition); // If the unit has landed, this will be the last tick if (self.World.Map.DistanceAboveTerrain(currentPosition).Length <= 0) { var dat = self.World.Map.DistanceAboveTerrain(currentPosition); pos.SetPosition(self, currentPosition - new WVec(WDist.Zero, WDist.Zero, dat)); return(true); } return(false); }
public override bool Tick(Actor self) { if (disableable != null && disableable.IsTraitDisabled) { return(false); } var pos = length > 1 ? WPos.Lerp(start, end, ticks, length - 1) : end; positionable.SetCenterPosition(self, pos); if (++ticks >= length) { return(true); } return(false); }