程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> .NET網頁編程 >> C# >> C#入門知識 >> Unity3d獲得體系時光

Unity3d獲得體系時光

編輯:C#入門知識

Unity3d獲得體系時光。本站提示廣大學習愛好者:(Unity3d獲得體系時光)文章只能為提供參考,不一定能成為您想要的結果。以下是Unity3d獲得體系時光正文


Unity是由Unity Technologies開辟的一個讓玩家輕松創立諸如三維視頻游戲、修建可視化、及時三維動畫等類型互動內容的多平台的綜合型游戲開辟對象,是一個周全整合的專業游戲引擎。Unity相似於Director,Blender game engine, Virtools 或 Torque Game Builder等應用交互的圖型化開辟情況為重要方法的軟件其編纂器運轉在Windows 和Mac OS X下,可宣布游戲至Windows、Mac、Wii、iPhone、Windows phone 8和Android平台。也能夠應用Unity web player插件宣布網頁游戲,支撐Mac和Windows的網頁閱讀。它的網頁播放器也被Mac widgets所支撐。

上面經由過程一段代碼給年夜家引見unity3d獲得體系時光。

詳細代碼以下所示:

var gSkin:GUISkin;
var str="";
var  Months:String[]=["一月","二月","三月","四月","蒲月","六月","七月","八月","九月","十月","十一月","十二月"];
var  Days:String[]= ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20",
"21","22","23","24","25","26","27","28","29","30","31"];
var  dNow:System.DateTime;
var i=0;
function OnGUI()
{if(gSkin)GUI.skin=gSkin;
  GUILayout.Box("當地日期時光:"+System.DateTime.Now);//當地時光,12小時制的
  GUILayout.Box("軍事日期時光:"+System.DateTime.Now.ToString("yyyyMMddHHmmss"));
  GUILayout.Box("UTC日期時光:"+System.DateTime.UtcNow);//UTC時光
GUILayout.SelectionGrid(System.DateTime.Now.Month-1,Months,3);
  GUILayout.SelectionGrid(System.DateTime.Now.Day-1,Days,10);
  GUILayout.Box(str+dNow.Now.Year+"年"+dNow.Now.Month+"月"+dNow.Now.Day+" 日"+"  "+dNow.Now.Hour+"時"+dNow.Now.Minute+"分"+dNow.Now.Second+"秒");
}

以上代碼就是關於Unity3d獲得體系時光的全體內容,代碼附有正文,哪裡寫的欠好的處所迎接列位年夜俠提出名貴看法。感謝。

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved