AddVelocity() public method

public AddVelocity ( IntVector2 newValue ) : Entity
newValue IntVector2
return Entity
Ejemplo n.º 1
0
 void navigateMissileOrDestroy(Entity e)
 {
     if (!hasFoundTarget(e.followTarget)) {
         e.isDestroyEntity = true;
         return;
     }
     else {
         e.AddVelocity(new Vector2());
         setVelocityBasedOnTarget(e);
         e.RemoveFollowTarget();
     }
 }
 /// <summary>
 /// Add a delay AFTER creating the ball visuall and BEFORE moving it. A courtesy to player.
 /// </summary>
 private void StartNextRound_Coroutine(Entity entityBall)
 {
     entityBall.AddVelocity (GameConstants.GetBallInitialVelocity());
 }
 /// <summary>
 /// Add a delay AFTER creating the ball visuall and BEFORE moving it. A courtesy to player.
 /// </summary>
 private IEnumerator StartNextRound_Coroutine(Entity entityBall)
 {
     entityBall.AddVelocity (GameConstants.GetBallInitialVelocity());
     yield return null;
 }