Documentation

WHAT WE GOT

AABB
Physics Environment

Animation
Actions & Animations

Array
Support Classes

Audio
Sounds & Music

Audio Effect
Sounds & Music

Background Audio
Sounds & Music

Bezier
Actions & Animations

Blink
Actions & Animations

Body
Physics Environment

Callback
Actions & Animations

Chain Shape
Physics Environment

Circle Shape
Physics Environment

Color
Support Classes

Delay
Actions & Animations

Device
Support Classes

Director
Essentials

Ease
Actions & Animations

Edge Shape
Physics Environment

Event
Support Classes

Fade
Actions & Animations

Filter
Physics Environment

Fixture
Physics Environment

Jump
Actions & Animations

Label
User Interface

Layer
Essentials

Layer Color
Essentials

Liquid
Actions & Animations

Mass Data
Physics Environment

Menu
User Interface

Menu Image
User Interface

Menu Label
User Interface

Move
Actions & Animations

Numeric
Support Clases

Object Layer
Tiled Maps

Physics Sprite
Physics Environment

Place
Actions & Animations

Point
Support Classes

Polygon Shape
Physics Environment

Repeat
Actions & Animations

Rotate
Actions & Animations

Scale
Actions & Animations

Scene
Essentials

Screen
Support Classes

Sequence
Actions & Animations

Shape
Physics Environment

Shuffle
Actions & Animations

Size
Support Classes

Skew
Actions & Animations

Spawn
Actions & Animations

Split
Actions & Animations

Sprite
Essentials

Sprite Batch
Essentials

Sprite Frame Cache
Essentials

Tile Layer
Tiled Maps

Tile Map
Tiled Maps

Tile Set
Tiled Maps

Tint
Actions & Animations

Touch
Support Classes

Turn
Actions & Animations

Twirl
Actions & Animations

Visibility
Actions & Animations

Wave
Actions & Animations

Wiggle
Actions & Animations

World
Physics Environment

ACTIONS & ANIMATIONS

Scale

The Scale class provides an action that modifies a node's scale attribute.

By

Scales an object by modifying its scale attribute:

first_scale_by_action = Scale.by scale:0.5
second_scale_by_action = Scale.by scale:1.0
scale_by_sequence = Sequence.with actions:[first_scale_by_action, second_scale_by_action]

# After running the sequence, character will be 50% smaller
character.run_action scale_by_sequence

To

Scales an object by setting its scale attribute:

first_scale_to_action = Scale.to scale:0.5
second_scale_to_action = Scale.to scale: 1.0
scale_to_sequence = Sequence.with actions:[first_scale_to_action, second_scale_to_action]

# After running the sequence, character will remain the same size
character.run_action scale_to_sequence
Watch out!

This action doesn't support "reverse".

Options

duration: - Float - Default: 0.3
Sets the total duration time of the Action.