예제 #1
0
        public HomeModel GetHomeInfo()
        {
            HomeModel homeModel = new HomeModel();
            //首页Banner
            BannerManager bannerManager = new BannerManager();

            homeModel.Banners = bannerManager.GetHomeBanners();
            //热卖商品列表
            RecommendManager recommandManager = new RecommendManager();

            homeModel.HotSaleProducts = recommandManager.GetHomeHotSaleItemList();

            //新品上市商品列表:
            homeModel.RecommendProducts = recommandManager.GetHomeRecommendProductList();

            //今日特卖商品列表:
            homeModel.TodayHotSaleProducts = recommandManager.GetTodayHotSaleItemlist();

            //首页楼层列表
            FloorManager floorManager = new FloorManager();

            homeModel.Floors = floorManager.GetHomeFloors();

            //精选品牌
            homeModel.Brands = recommandManager.GetRecommendBrands();

            //限时抢购
            QueryResult <CountDownItemModel> countDownList = new CountdownManager().GetCountDownList(0, 3);

            homeModel.CountDownList = countDownList.ResultList;

            return(homeModel);
        }
예제 #2
0
    void SubscribeOnCountdownManager(CountdownManager countdownManager)
    {
        countdownText.gameObject.SetActive(true);

        countdownManager.CountdownObservable
        .Subscribe(x => GetComponent <Text>().text = x.ToString(), () => countdownText.gameObject.SetActive(false))
        .AddTo(countdownManager.gameObject);
    }
예제 #3
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
예제 #4
0
        public JsonResult GetCountDownList(int pageIndex, int pageSize)
        {
            CountdownManager manager = new CountdownManager();
            QueryResult <CountDownItemModel> list = manager.GetCountDownList(pageIndex, pageSize);
            var result = new AjaxResult
            {
                Success = true,
                Data    = list
            };

            return(Json(result));
        }
예제 #5
0
        static void Postfix(CarLogic __instance)
        {
            try
            {
                string     AssetName = "Assets/Prefabs/NitronicCountdownHUD.prefab";
                GameObject Prefab    = CurrentPlugin.NitronicHUD.Bundle.LoadAsset <GameObject>(AssetName);
                GameObject HUD       = GameObject.Instantiate(Prefab);
                HUD.name = "NitronicCountdownHUD";

                Countdown NR_3 = HUD.transform.FindChild("NR-3").gameObject.AddComponent(typeof(Countdown)) as Countdown;
                NR_3.StartKey    = -3.5f;
                NR_3.DurationKey = 0.75f;

                Countdown NR_2 = HUD.transform.FindChild("NR-2").gameObject.AddComponent(typeof(Countdown)) as Countdown;
                NR_2.StartKey    = -2.5f;
                NR_2.DurationKey = 0.75f;

                Countdown NR_1 = HUD.transform.FindChild("NR-1").gameObject.AddComponent(typeof(Countdown)) as Countdown;
                NR_1.StartKey    = -1.5f;
                NR_1.DurationKey = 0.75f;

                Countdown NR_R = HUD.transform.FindChild("NR-Rush").gameObject.AddComponent(typeof(Countdown)) as Countdown;
                NR_R.StartKey    = -0.5f;
                NR_R.DurationKey = 1.0f;

                CountdownManager Manager = HUD.AddComponent(typeof(CountdownManager)) as CountdownManager;
                Manager.Setup();

                Scene scene = SceneManager.GetActiveScene();
                if (scene.name != "MainMenu" && scene.name != "LevelEditor" && G.Sys.GameManager_.ModeID_ != GameModeID.Adventure && G.Sys.GameManager_.ModeID_ != GameModeID.LostToEchoes)
                {
                    __instance.gameObject.AddComponent <UnityScripts.GameUpdate>();
                }
            }
            catch (Exception e)
            {
            }
        }
예제 #6
0
 public void SetCountDownNow()
 {
     CDM = GameObject.Find("321GO").GetComponent <CountdownManager>();
     CDM.countDownDone = true;
 }
예제 #7
0
 void Start()
 {
     Time.timeScale = 0f;
     Cursor.visible = false;
     CDM            = GameObject.Find("321GO").GetComponent <CountdownManager>();
 }
예제 #8
0
 public void CountdownJob(object source, ElapsedEventArgs e)
 {
     CountdownManager.GetInstance().CountdownJob();
 }