protected override void OnShow(object userData) { base.OnShow(userData); m_BgData = (BgData)userData; //修改开始位置 CachedTransform.SetLocalPositionX(m_BgData.StartPostion); }
/// <summary> /// 显示背景实体 /// </summary> public static void ShowBg(this EntityComponent entityComponent, BgData data) { entityComponent.ShowEntity(typeof(Bg), "Bg", data); }