CocosSharp.CCAmplitudeAction.Amplitude Property
The amplitude value.

Syntax

public float Amplitude { get; }

Value

Remarks

Concrete subclasses such as CocosSharp.CCWaves or CocosSharp.CCTwirl require an amplitude when defining the periodic behavior of the action. Loosely, the higher the amplitude, the greater the variation on the particular attributes of the target node.

C# Example

var action = new CCWaves(2.0f, new CCGridSize(10, 10));
action.Waves = 10;
action.Amplitude = 10.0f;

// Over 2 seconds periodically change vertex positions of node grid
// This gives us a wave-like effect
node1.RunAction(action);

action.Amplitude = 50.0f;

// Increasing the amplitude increases the variation in vertex positions.
// This gives us a more vigorous wave effect
node2.RunAction(action);

Requirements

Namespace: CocosSharp
Assembly: CocosSharp (in CocosSharp.dll)