Exemplo n.º 1
0
        protected override void OnShow(object userData)
        {
            base.OnShow(userData);

            m_BgData = (BgData)userData;
            CachedTransform.SetLocalPositionX(m_BgData.StartPosition);
        }
        //TODO:简便显示实体的封装示例
        //public static void ShowAircraft(this EntityComponent entityComponent, AircraftData data)
        //{
        //    entityComponent.ShowEntity(typeof(Aircraft), "Aircraft", data);
        //}

        /// <summary>
        /// 显示背景实体
        /// </summary>
        public static void ShowBg(this EntityComponent entityComponent, BgData data)
        {
            entityComponent.ShowEntity(typeof(Bg), "Bg", data);
        }
Exemplo n.º 3
0
 // todo
 public static void ShowBg(this EntityComponent entityComponent, BgData data)
 {
     entityComponent.ShowEntity(typeof(Bg), "Bg", Constant.AssetPriority.BgAsset, data);
 }