Example #1
0
 public override void SetTarget(LNNode node)
 {
     base._firstTick = true;
     base._isEnd     = false;
     base._target    = node;
     _startPosition  = node.GetPosition();
 }
Example #2
0
 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);
 }
Example #3
0
 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);
 }
Example #4
0
 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);
 }
Example #5
0
 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()));
     }
 }