public override void SetTarget(LNNode node) { base._firstTick = true; base._isEnd = false; base._target = node; _startPosition = node.GetPosition(); }
public override void SetTarget(LNNode node) { base._firstTick = true; base._isEnd = false; base._target = node; base._orgPos = node.GetPosition(); base._pos = base._orgPos.Add(base._diff); }
public override void SetTarget(LNNode node) { base._firstTick = true; base._isEnd = false; base._target = node; this._orgPos = node.GetPosition(); this._diff = this._pos.Sub(this._orgPos); }
public override void SetTarget(LNNode node) { base._firstTick = true; base._isEnd = false; base._target = node; base._orgPos = node.GetPosition(); base._delta.Set(this._delta.x - this._orgPos.x, this._delta.y - this._orgPos.y); }
public override void Step(float dt) { if (_boundarySet) { if (_boundaryFullyCovered) { return; } Vector2f pos = halfScreenSize.Sub(_followedNode.GetPosition()); base._target.SetPosition( MathUtils.Clamp(pos.x, leftBoundary, rightBoundary), MathUtils.Clamp(pos.y, bottomBoundary, topBoundary)); } else { base._target.SetPosition(halfScreenSize.Sub(_followedNode .GetPosition())); } }