/// <summary> /// Tries to stop the ability at the specified index. /// </summary> /// <param name="index">The ability index to stop.</param> private void TryStopAbility(int index) { #if ENABLE_MULTIPLAYER CmdTryStopAbility(index); // Execute the method on the local instance. Use isClient instead of isServer because the client and server may be the same instance // in which case the method will be called with the Rpc call. if (!isClient) { #endif m_Controller.TryStopAbility(m_Controller.Abilities[index]); #if ENABLE_MULTIPLAYER } #endif }
public void Walk() { characterController.TryStopAbility(speedChange); }