实习第7-11天

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/iceSony/article/details/81296735

实习第七天

除了需要实时加载的模型图像,其他可以用预制体的加载实现渲染的,一律放置到ui层级减少cpu消耗。

实习第八天

学会一键添加ui tag,一键生成图片资源。这样在代码中使用UIMgr.Instance(“sprite名称”),就可以动态加载。

实习第九至十一天

天赋技能的替换,其实还是重命名文件,读取而已。

实现一个动态改变,利用

local timer = 1
	local exit_time = 15
		CS.TimeMgr.Instance:AddTimeInterval("ChangeExitTime", CS.TimerStruct(15, true, function()
		timer = timer + CS.UnityEngine.Time.deltaTime
		if timer >= 1 then
			timer = 0
			exit_time=exit_time-1
			panel_data.comps.info_tab.exit_time.text = exit_time.."s"
			if exit_time == 0 then
				local curSceneId=tonumber(CS.GameMain.Instance.mSceneId)
				if CS.GameMain.Instance:isUnknownMapInMini(curSceneId) ~= true then
				--请求退出
				local ret = {}
				ret.sid = curSceneId
				ret.reason = SceneProp.seBack
				Networks.Push_msg(Network.MsgEnterSceneRequest,ret)
				end
			end
		end
		
	end))
与
CS.TimeMgr.Instance:RmvTimeInterval("ChangeExitTime")

这样动态修改内容

项目还有两天上线,到时候又要忙碌起来了,加油ヾ(◍°∇°◍)ノ゙

 

 

扫描二维码关注公众号,回复: 3127189 查看本文章

猜你喜欢

转载自blog.csdn.net/iceSony/article/details/81296735