コード例 #1
0
 //打开界面之后处理的一些工作
 public override void HandleAfteerOpenView()
 {
     base.HandleAfteerOpenView();
     //重读设置界面的内容
     ToolsFunction.Log(this.gameObject.name, "执行了HandleAfterOpenView函数");
     //SettingTb.Element = CMySql.GetOneColumnTab("settingtb");
     XmlReadDoc.ReadSetting();
     if (toggleMusic)  //在组件找到的情况下
     {
         InitSetting();
     }
     //StartCoroutine(InitSettingFunc());
     //InitSetting();
 }
コード例 #2
0
        /// <summary>
        /// 打开界面之后的操作
        /// </summary>
        public override void HandleAfteerOpenView()
        {
            base.HandleAfteerOpenView();
            ResetCountAnimation();
            ToolsFunction.Log(this.ToString(), "HandleAfteerOpenView执行了");
            //重新读取设置的配置信息
            XmlReadDoc.ReadSetting();
            //SettingTb.Element =CMySql. GetOneColumnTab("settingtb");
            //应用默认的设置信息
            if (this.gameObject)
            {
                InitMainSetting();
            }
            //开始播放倒数动画
            //PlayCountAnimation();

            //开启倒计时器的协程, 总时间10*60== 600s
            nTotalSecond = 600;
            StartCoroutine(TimerCount(nTotalSecond));
        }
コード例 #3
0
        private UISlider sliderQuality = null; //设置游戏品质

        // Use this for initialization
        void Awake()
        {
            btnBack     = FindInChild <Button>("btnBack");
            toggleMusic = FindInChild <UIToggle>("Center/Content/toggleMusic");
            if (toggleMusic)
            {
                ToolsFunction.Log(this.gameObject, "已经找到音乐选项了");
            }
            toggleMaintip = FindInChild <UIToggle>("Center/Content/toggleMaintip");
            sliderSpeed   = FindInChild <UISlider>("Center/Content/sliderSpeed");
            sliderQuality = FindInChild <UISlider>("Center/Content/sliderQuality");

            btnBack.onClick = OnbtnBack;
            toggleMusic.onChange.Add(new EventDelegate(toggleMusicOnClick));
            toggleMaintip.onChange.Add(new EventDelegate(toggleMaintipOnClick));
            sliderSpeed.onChange.Add(new EventDelegate(sliderSpeedOnClick));
            sliderQuality.onChange.Add(new EventDelegate(sliderQualityOnClick));

            XmlReadDoc.ReadSetting();

            //初始化设置界面的组件
            InitSetting();
        }