示例#1
0
        protected internal override void OnShow(object userData)
#endif
        {
            base.OnShow(userData);

            m_MyAircraftData = userData as MyAircraftData;
            if (m_MyAircraftData == null)
            {
                Log.Error("My aircraft data is invalid.");
                return;
            }

            //ScrollableBackground sceneBackground = FindObjectOfType<ScrollableBackground>();
            //if (sceneBackground == null)
            //{
            //    Log.Warning("Can not find scene background.");
            //    return;
            //}

            //m_PlayerMoveBoundary = new Rect(sceneBackground.PlayerMoveBoundary.bounds.min.x, sceneBackground.PlayerMoveBoundary.bounds.min.z,
            //    sceneBackground.PlayerMoveBoundary.bounds.size.x, sceneBackground.PlayerMoveBoundary.bounds.size.z);
        }
示例#2
0
 //-----------旧工程实体创建扩展示例-------------start
 public static void ShowMyAircraft(this EntityComponent entityComponent, MyAircraftData data)
 {
     entityComponent.ShowEntity(typeof(MyAircraft), "Aircraft", Constant.AssetPriority.MyAircraftAsset, data);
 }