当前位置: 首页 > news >正文

聊城建设银行官方网站天津做网站的哪家好

聊城建设银行官方网站,天津做网站的哪家好,摄影网站网络促销方式,南京展厅设计装修本身也具有一些unity知识#xff0c;包括Eidtor界面使用、Shader效果实现、性能分析#xff0c;但对C#、游戏逻辑不太清楚#xff0c;这次想从开发者角度理解游戏#xff0c;提高C#编程#xff0c;从简单的unity游戏理解游戏逻辑#xff0c;更好的为工作服务。 unity201…本身也具有一些unity知识包括Eidtor界面使用、Shader效果实现、性能分析但对C#、游戏逻辑不太清楚这次想从开发者角度理解游戏提高C#编程从简单的unity游戏理解游戏逻辑更好的为工作服务。 unity2019.4.40f1c1使用Unity官网FPS Microgame如下图。原本想从游戏源码启动流程开始学习但Unity核心代码没有开源就还是先理解游戏逻辑。 游戏分成 5个Scene我们关注MainScene其中有个GameManager从Inspector看挂有许多Scripts我们先一个个分析。 GameFlowManager引用using UnityEngine.SceneManagement定义类GameFlowManager前半部分是在自定义Eidtor界面这里float timeRatio 1 - (m_TimeLoadEndGameScene - Time.time) / endSceneLoadDelay;不是很理解待续 using UnityEngine; using UnityEngine.SceneManagement;public class GameFlowManager : MonoBehaviour {[Header(Parameters)][Tooltip(Duration of the fade-to-black at the end of the game)]public float endSceneLoadDelay 3f;[Tooltip(The canvas group of the fade-to-black screen)]public CanvasGroup endGameFadeCanvasGroup;[Header(Win)][Tooltip(This string has to be the name of the scene you want to load when winning)]public string winSceneName WinScene;[Tooltip(Duration of delay before the fade-to-black, if winning)]public float delayBeforeFadeToBlack 4f;[Tooltip(Duration of delay before the win message)]public float delayBeforeWinMessage 2f;[Tooltip(Sound played on win)]public AudioClip victorySound;[Tooltip(Prefab for the win game message)]public GameObject WinGameMessagePrefab;[Header(Lose)][Tooltip(This string has to be the name of the scene you want to load when losing)]public string loseSceneName LoseScene;public bool gameIsEnding { get; private set; }PlayerCharacterController m_Player;NotificationHUDManager m_NotificationHUDManager;ObjectiveManager m_ObjectiveManager;float m_TimeLoadEndGameScene;string m_SceneToLoad;void Start(){ Debug.Log(Start Game: m_Player);//返回场景中的所填类型的随机个体m_Player FindObjectOfTypePlayerCharacterController();//DebugUtility.cs不是Unity中的内置脚本,存在Assets/FPS/Scripts/DebugUtility.csDebugUtility.HandleErrorIfNullFindObjectPlayerCharacterController, GameFlowManager(m_Player, this);m_ObjectiveManager FindObjectOfTypeObjectiveManager();DebugUtility.HandleErrorIfNullFindObjectObjectiveManager, GameFlowManager(m_ObjectiveManager, this);AudioUtility.SetMasterVolume(1);}void Update(){if (gameIsEnding){ Debug.Log(m_TimeLoadEndGameScene: m_TimeLoadEndGameScene);Debug.Log(Time.time: Time.time);Debug.Log(endSceneLoadDelay: endSceneLoadDelay);float timeRatio 1 - (m_TimeLoadEndGameScene - Time.time) / endSceneLoadDelay;Debug.Log(timeRatio: timeRatio);endGameFadeCanvasGroup.alpha timeRatio;AudioUtility.SetMasterVolume(1 - timeRatio);// See if its time to load the (after the delay)if (Time.time m_TimeLoadEndGameScene){Debug.Log(Scene loading: m_SceneToLoad);SceneManager.LoadScene(m_SceneToLoad);gameIsEnding false;}}else{if (m_ObjectiveManager.AreAllObjectivesCompleted())EndGame(true);// Test if player diedif (m_Player.isDead)EndGame(false);}}void EndGame(bool win){// unlocks the cursor before leaving the scene, to be able to click buttonsCursor.lockState CursorLockMode.None;Cursor.visible true;// Remember that we need to load the appropriate end scene after a delaygameIsEnding true;endGameFadeCanvasGroup.gameObject.SetActive(true);if (win){m_SceneToLoad winSceneName;m_TimeLoadEndGameScene Time.time endSceneLoadDelay delayBeforeFadeToBlack;// play a sound on winvar audioSource gameObject.AddComponentAudioSource();audioSource.clip victorySound;audioSource.playOnAwake false;audioSource.outputAudioMixerGroup AudioUtility.GetAudioGroup(AudioUtility.AudioGroups.HUDVictory);audioSource.PlayScheduled(AudioSettings.dspTime delayBeforeWinMessage);// create a game messagevar message Instantiate(WinGameMessagePrefab).GetComponentDisplayMessage();if (message){message.delayBeforeShowing delayBeforeWinMessage;message.GetComponentTransform().SetAsLastSibling();}}else{m_SceneToLoad loseSceneName;m_TimeLoadEndGameScene Time.time endSceneLoadDelay;}} }
http://www.dnsts.com.cn/news/135279.html

相关文章:

  • 鞍山做网站哪家好建设部网站监理工程师报名
  • wordpress安装demo宁波抖音seo公司
  • 微信网站开发与网站实质区别wordpress汉化自适应主题
  • wordpress 站群模板在线教育 wordpress
  • 杭州网站建设咨询蓝韵网络网络公司注册流程
  • 微信公众号设计网站jsp网站 值班功能
  • 北京 建公司网站要多少钱如何通过查询网站注册时间
  • 去国外做赌钱网站安徽合肥建筑公司
  • 网站建设QQ刷赞企业目录
  • 网站建设主要流程图常见的电子商务网站推广方式
  • 网站开发学习网站dedecms医院网站wap模板(橙色)4512345
  • 八宿县网站seo优化排名网站前台功能介绍
  • 营销网站的建设品牌建设工作方案
  • 凡科网站建设网站建设关键词排名
  • 深圳电商网站开发公司室内设计效果图怎么做出来的
  • 昭通网站建设软文广告有哪些
  • 爱站关键词挖掘old和wordpress类似的源码
  • 网站模板下载破解版湖北交投建设集团网站
  • 网站制作应该注意到的问题公众号电脑版登陆入口
  • 用ip做网站网络推广营销网站建设专家
  • 网站制作 万网wordpress 插件检测
  • 江苏城乡建设网站网站收录怎么删
  • 网站遭到攻击苏州seo排名
  • 河南视频网站建设公司j永久网站
  • 官方网站建设必要性哈尔滨网站建设服务
  • 北京微网站建设公司百度地图网页版进入
  • 电子商务网站建设与管理期末试卷网页设计模板 中文
  • 甘肃建设厅网站执业注册中心深圳做手机的企业网站
  • 模板网站自助建站新乡谷雨网络公司做的网站怎么样
  • FLASK做wiki网站春雨直播正版下载