// 'short' helper function to get custom tile action controller
 TileActions Actions(OTObject owner)
 {
     return owner.Controller(typeof(TileActions)) as TileActions;
 }
Example #2
0
 /// <summary>
 /// Sets this shape as a path for an OTObject
 /// </summary>
 /// <param name="o">Orthello object</param>
 /// <param name="duration">Movement Duration</param>
 /// <param name="looping">Object will be looping on shape</param>
 /// <param name="addRotation">Add aditional rotation</param>
 /// <returns>A path controller for this object.</returns>
 public OTPathController IsPathFor(OTObject o, float duration, bool looping, float addRotation)
 {
     OTPathController moving = new OTPathController(o, "movingpath", this, duration);
     moving.looping = looping;
     moving.addRotation = addRotation;
     OTController c = o.Controller(typeof(OTPathController));
     if (c != null)
         o.RemoveController(c);
     o.AddController(moving);
     return moving;
 }