public override bool Init() { //新的层 Layer l = new Layer(); //层添加到场景 addLayer(l); return true; }
/// <summary> /// 向场景中添加层 /// </summary> /// <param name="layer">指定要添加的层</param> /// <returns>是否正常添加</returns> public bool addLayer(Layer layer) { bool flag = true; if (!arrLayer.Contains(layer)) { arrLayer.Add(layer); } else { flag = false; } return flag; }