efe_ertugrul

apple developer

home tech_notes app_store github stackoverflow devto

Configuring Action Timing

Time an action in a scene, by adding or modifying timing properties, or cancel an action.

Overview

By default, an action with a duration applies its changes linearly over the duration you specify. However, you can adjust the timing of actions.

Add or Change Properties to Adjust the Timing of an Action

These options are available:

Note: A node’s speed property has the same effect as the action’s speed property, but the rate is applied to all actions processed by the node or any of its descendants in the scene tree.

Because there are multiple rates involved in an animation’s speed, SpriteKit finds all the rates that apply to the action and multiplies them to determine the final rate.

Cancel Actions that Should Be Stopped

To cancel actions that a node is running, call its removeAllActions() method. All actions are removed from the node immediately. If a removed action had a duration, any changes it already made to the node remain intact, but further changes are not executed.


download this page as .md

download this page as .pdf

back to SpriteKit documentation