private void MovementVector()
 {
     if (_positions.Count == 0 && _force != Vector2.Zero)
     {
         Entity.GetComponent <CollisionComponent>().body.ResetDynamics();
         _positionReached = false;
         _force           = Vector2.Zero;
     }
     else if (_positions.Count > 0)
     {
         Entity.GetComponent <CollisionComponent>().body.ResetDynamics();
         _force = new Vector2((_positions[0].X - Entity.Transform.x) * forceAmount, (_positions[0].Y - Entity.Transform.y) * forceAmount);
         Entity.GetComponent <CollisionComponent>().body.ApplyForce(_force);
         Debug.WriteLine(_force.ToString());
         _positionToReached = _positions[0];
         _positionReached   = false;
         _positions.RemoveAt(0);
     }
 }
Beispiel #2
0
 public override string ToString()
 {
     return(_vector.ToString());
 }