 | AbstractMapTPointAnimate Method |
Animates a according to a fixed function. This is useful for animating grids
when the animation does not depend on any input.
Namespace:
Gamelogic.Grids
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntaxpublic IMap<TPoint> Animate(
Func<Vector2, float, Vector2> animation,
Func<Vector2, float, Vector2> inverseAnimation
)
Parameters
- animation
- Type: SystemFuncVector2, Single, Vector2
This is a function that takes as parameters the a point in
the static grid and a time t(in seconds) and returns the new point
at that time.An example of an animation is (x, t) => x + 5 * Mathf.Sin(t / 100) * Vector(1, 0),
which will move the grid right and left periodically
- inverseAnimation
- Type: SystemFuncVector2, Single, Vector2
This inverse function returns the point in the static grid, given the
animated point and time.If animate(p, t) returns r, then iverseAnimation(r, t)
must return p.
Return Value
Type:
IMapTPoint
See Also