Zeplin.Layer.Add C# (CSharp) 메소드

Add() 공개 메소드

Adds a GameObject to this layer
public Add ( Zeplin.GameObject addedObject ) : void
addedObject Zeplin.GameObject The added GameObject
리턴 void
        public virtual void Add(GameObject addedObject)
        {
            gameObjectList.Add(addedObject);
        }

Usage Example

예제 #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;
 }