public AddVelocity ( IntVector2 newValue ) : Entity | ||
newValue | IntVector2 | |
Результат | Entity |
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; }