Add() public method

Adds a GameObject to this layer
public Add ( Zeplin.GameObject addedObject ) : void
addedObject Zeplin.GameObject The added GameObject
return void
コード例 #1
0
ファイル: Layer.cs プロジェクト: zumpiez/Zeplin
 /// <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;
 }