Add() public method

Adds a GameObject to this layer
public Add ( Zeplin.GameObject addedObject ) : void
addedObject Zeplin.GameObject The added GameObject
return void
Exemplo n.º 1
0
 /// <summary>
 /// Moves an actor to another layer
 /// </summary>
 /// <param name="movedActor">The actor to be moved</param>
 /// <param name="destinationLayer">The layer to move the actor to</param>
 /// <returns>True if the operation was successful, otherwise false</returns>
 public bool MoveTo(GameObject movedObject, Layer destinationLayer)
 {
     bool result = Remove(movedObject);
     if (result) destinationLayer.Add(movedObject);
     return result;
 }