AddVelocity() 공개 메소드

public AddVelocity ( IntVector2 newValue ) : Entity
newValue IntVector2
리턴 Entity
예제 #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;
 }