Example #1
0
        // 下发这个章节对应数据信息


        private void ClickLeftButton()
        {
            if (SceneData.SceneOrder == 1)
            {
                //Debug.Log("场景开始");
                return;
            }
            Data.GetInstance().pluscurrentSceneID(-1);
            SceneData = TableDataExtension.GetTableData <DRScene>(Data.GetInstance().getcurrentSceneID());

            UIInfoShowBySceneID();
            //测试
            //Data.GetInstance().plusCoin(50.1f);
        }
Example #2
0
        public SceneData(int entityId, int typeId, int sceneOrder, int chapterNum)
            : base(entityId, typeId)
        {
            IDataTable <DRScene> dtScene = GameEntry.DataTable.GetDataTable <DRScene>();
            DRScene drScene = dtScene.GetDataRow(TypeId);

            //TableDataExtension.GetTableData<DRScene>(104);
            if (drScene == null)
            {
                return;
            }

            sceneOrder = drScene.SceneOrder;
            chapterNum = drScene.ChapterNum;
        }
Example #3
0
        private void ClickRightButton()
        {
            if (SceneData.SceneOrder == SceneNum || Data.GetInstance().getcurrentSceneID() + 1 > Data.GetInstance().getmaxSceneID())
            {
                //Debug.Log("可用场景结束");
                return;
            }

            Data.GetInstance().pluscurrentSceneID(1);
            SceneData = TableDataExtension.GetTableData <DRScene>(Data.GetInstance().getcurrentSceneID());

            UIInfoShowBySceneID();
            //测试
            //Data.GetInstance().plusCoin(-60.1f);
        }
Example #4
0
 private void UIInfoShowBySceneID()
 {
     SceneData = TableDataExtension.GetTableData <DRScene>(Data.GetInstance().getcurrentSceneID());
     if (SceneData.SceneOrder <= 2)
     {
         scene_image.sprite   = Resources.Load <Sprite>("UI/UIphoto/homeMenuUI/scene_" + SceneData.SceneOrder);
         sceneBG_image.sprite = Resources.Load <Sprite>("UI/UIphoto/homeMenuUI/sceneBG_" + SceneData.SceneOrder);
     }
     else
     {
         scene_image.sprite   = Resources.Load("UI/UIphoto/Number_" + SceneData.SceneOrder, typeof(Sprite)) as Sprite;
         sceneBG_image.sprite = Resources.Load <Sprite>("UI/UIphoto/homeMenuUI/sceneBG_" + 1);
     }
     mapName_image.sprite = Resources.Load("UI/UIphoto/" + SceneData.NameAsset, typeof(Sprite)) as Sprite;
     //测试
     //Debug.Log("当前场景 ID" + Data.GetInstance().getcurrentSceneID());
     id_text.text = Data.GetInstance().getcurrentSceneID() + "";
 }
Example #5
0
 // Use this for initialization
 private void Awake()
 {
     Data.GetInstance().SaveData_standAlone_Get();
     SceneData = TableDataExtension.GetTableData <DRScene>(Data.GetInstance().getcurrentSceneID());
 }