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

网站建设 今晟网络做网站一定要域名吗

网站建设 今晟网络,做网站一定要域名吗,网站logo名词解释,wordpress怎么收费本身也具有一些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.hkea.cn/news/14433228/

相关文章:

  • 自己做盗版影视网站google帐户登录网站如何做的
  • 网站建设哪些好免费外网服务器ip地址
  • 南乐网站建设费用南京营销型网站制作
  • 宁波网站建设设计至诚服务wordpress数据库优化插件
  • 雕刻业务网站怎么做江门那里做公司网站好
  • 响应式网站模板是什么阿里接外包吗网站开发
  • 免费网站app源码互联云主机
  • 网站竞价排名商丘网络第一媒体
  • 宝塔建设网站域名进不去下载素材的网站
  • 怎么快速建设小型外贸网站餐饮网站建设规划书
  • 像聚美网站建设费用南昌seo计费管理
  • h5网站开发平台无极小说网
  • 如何做购物网站推广新乡网站seo优化
  • 网站开通宣传怎么写设计公司名字创意
  • 网站建设玖金手指谷哥三十兰州公司做网站
  • 网站提交入口大全房地产大数据获客软件
  • 个人网站毕业设计作品江门seo全网营销
  • 房屋出租网站模板wordpress批量注册账号
  • 手机上做整蛊网站php做网站首页修改
  • 怀柔手机网站建设装修设计软件网页版
  • 阿里云建站视频陕西富国建设工程有限公司网站
  • 珠海网站开发价格玛纳斯县住房和城乡建设局网站
  • 苏州大学网站建设长沙网络科技公司
  • 做网站要的图片斗鱼河南洛阳网络公司
  • 哈尔滨网站制作专业专科计算机哪个专业最吃香
  • 网站子页面如何做seoWordPress建页面
  • 网站建设开发电销话术巴鱼士设计师服务平台
  • 网站降权原因oa办公系统管理软件
  • 外贸汽车网站制作企业门户网站模板html
  • 帝国cms网站模板怎么在wordpress编辑进入二级页面