Behaviour
Object Hierarchy:
Description:
public abstract class Behaviour :
Object,
Scriptable
Base class for behaviours.
Namespace: Clutter
Package: clutter-1.0
Content:
Properties:
-
public Alpha alpha { set; get; }
The Alpha object used to drive this behaviour. A
Alpha object binds a Timeline and a
function which computes a value (the "alpha") depending on the time. Each time the alpha value changes the alpha-notify virtual
function is called.
Creation methods:
Methods:
-
public void actors_foreach (BehaviourForeachFunc func)
Calls func for every actor driven by behave.
-
public virtual void alpha_notify (double alpha_value)
-
public void apply (Actor actor)
Applies behave to actor. This function adds a reference on the actor.
-
public SList<weak Actor> get_actors ()
Retrieves all the actors to which behave applies. It is not recommended for derived
classes to use this in there alpha notify method but use
actors_foreach as it avoids alot of needless allocations.
-
public weak Alpha get_alpha ()
Retrieves the Alpha object bound to behave
.
-
public int get_n_actors ()
Gets the number of actors this behaviour is applied too.
-
public weak Actor get_nth_actor (int index_)
Gets an actor the behaviour was applied to referenced by index num.
-
public bool is_applied (Actor actor)
Check if behave applied to actor.
-
public void remove (Actor actor)
Removes actor from the list of Actor
s to which behave applies. This function removes a reference on the actor.
-
public void remove_all ()
Removes every actor from the list that behave holds.
-
public void set_alpha (Alpha alpha)
Binds alpha to a Behaviour.
The Alpha object is what makes a behaviour work: for each tick of the timeline used
by Alpha a new value of the alpha parameter is computed by the alpha function; the
value should be used by the Behaviour to update one or more properties
of the actors to which the behaviour applies.
Signals: