BBGamelib.flash.imp.FrameObject.trace C# (CSharp) Method

trace() public method

public trace ( int indent ) : string
indent int
return string
		public string trace(int indent){
//			string indent0 = Utils.RepeatString(indent);
//			string indent2 = Utils.RepeatString(indent+2);
//			string s = indent0 + "[Frame:" + frameNumber  + (label==null?"":("," + label)) + "]" + 
//				indent2 + "placeObjects("+placeObjects.Length + ")";
//			if (placeObjects.Length > 0) {
//				s += ":\n";
//				for(int i=0; i<placeObjects.Length; i++){
//					PlaceObject obj = placeObjects[i];
//					s += obj.trace(indent + 2) + "\n";
//				}
//			}
//			return s;
			return "";
		}
	}

Usage Example

        public string trace(int indent)
        {
            string indent0 = Utils.RepeatString(indent);
            string indent2 = Utils.RepeatString(indent + 2);
            string s       = indent0 + "[Frame:" + frameIndex + (label == null?"":("," + label)) + "]" +
                             indent2 + "placeObjects(" + objs.Length + ")";

            if (objs.Length > 0)
            {
                s += ":\n";
                for (int i = 0; i < objs.Length; i++)
                {
                    FrameObject obj = objs[i];
                    s += obj.trace(indent + 2) + "\n";
                }
            }
            return(s);
        }