91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

16個游戲源代碼僅供參考 。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

資源截圖

代碼片段和文件信息

using?UnityEngine;
using?UnityEditor;
using?System.Collections;

public?class?CreateQuad?:?scriptableWizard
{
//四邊形資源的名稱
public?string?MeshName?=?“Quad“;
//游戲對象的名稱
public?string?GameobjectName?=?“Plane_object“;
//包含這個四邊形資源的文件夾的名字
public?string?AssetFolder?=?“Assets“;
//四邊形的寬度
public?float?Width?=?1.0f;
//四邊形的高度
public?float?Height?=?1.0f;

public?enum?AnchorPoint
{
TopLeft
TopMiddle
TopRight
RightMiddle
BottomRight
BottomMiddle
BottomLeft
LeftMiddle
Center
Custom
}
//四邊形軸點的位置
public?AnchorPoint?Anchor?=?AnchorPoint.Center;
//軸點在四邊形上的水平位置
public?float?AnchorX?=?0.5f;
//軸點在四邊形上的垂直位置
public?float?AnchorY?=?0.5f;

//用于創建四邊形的函數
void?OnWizardCreate?()
{
//創建頂點
Vector3[]?Vertices?=?new?Vector3[4];
//基于軸點為四邊形的4個頂點賦值
//BottomLeft
Vertices[0].x?=?-AnchorX;
Vertices[0].y?=?-AnchorY;
//BottomRight
Vertices[1].x?=?Vertices[0].x?+?Width;
Vertices[1].y?=?Vertices[0].y;
//TopLeft
Vertices[2].x?=?Vertices[0].x;
Vertices[2].y?=?Vertices[0].y?+?Height;
//TopRight
Vertices[3].x?=?Vertices[0].x?+?Width;
Vertices[3].y?=?Vertices[0].y?+?Height;

//創建UV
Vector2[]?UVs?=?new?Vector2[4];
//Assign?UVs
//BottomLeft
UVs[0].x=0.0f;
UVs[0].y=0.0f;
//BottomRight
UVs[1].x=1.0f;
UVs[1].y=0.0f;
//TopLeft
UVs[2].x=0.0f;
UVs[2].y=1.0f;
//TopRight
UVs[3].x=1.0f;
UVs[3].y=1.0f;

//構成四邊形的2個三角形
int[]?Triangles?=?new?int[6];
//Assign?triangles
Triangles[0]=3;
Triangles[1]=1;
Triangles[2]=2;
Triangles[3]=2;
Triangles[4]=1;
Triangles[5]=0;

//Generate?mesh
Mesh?mesh?=?new?Mesh();
mesh.name?=?MeshName;
mesh.vertices?=?Vertices;
mesh.uv?=?UVs;
mesh.triangles?=?Triangles;
mesh.RecalculateNormals();

//Create?asset?in?database
AssetDatabase.CreateAsset(mesh?AssetDatabase.GenerateUniqueAssetPath(AssetFolder?+?“/“?+?MeshName)?+?“.asset“);
AssetDatabase.SaveAssets();

//Create?plane?game?object
Gameobject?plane?=?new?Gameobject(GameobjectName);
MeshFilter?meshFilter?=?(MeshFilter)plane.AddComponent(typeof(MeshFilter));
plane.AddComponent(typeof(MeshRenderer));
//Assign?mesh?to?mesh?filter
meshFilter.sharedMesh?=?mesh;
mesh.RecalculateBounds();
//Add?a?box?collider?component
plane.AddComponent(typeof(BoxCollider));
}

[MenuItem(“Gameobject/Create?Other/Custom?Plane“)]
static?void?CreateWizard?()
{
scriptableWizard.DisplayWizard?(“Create?Plane“?typeof(CreateQuad));
}

//此事件每秒會被調用10次
void?OnInspectorUpdate()
{
switch(Anchor)
{
case?AnchorPoint.TopLeft:
AnchorX?=?0.0f?*?Width;
AnchorY?=?1.0f?*?Height;
break;
case?AnchorPoint.TopMiddle:
AnchorX?=?0.5f?*?Width;
AnchorY?=?1.0f?*?Height;
break;
case?AnchorPoint.TopRight:
AnchorX?=?1.0f?*?Width;
AnchorY?=?1.0f?*?Height;
break;
case?AnchorPoint.RightMiddle:
AnchorX?=?1.0f?*?Width;
AnchorY?=?0.5f?*?Height;
break;
case?AnchorPoint.BottomRight:
AnchorX?=?1.0f?*?Width;
AnchorY?=?0.0f?*?Height;
break;
case?Anch

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-08-10?20:38??Unity?2D游戲開發從入門到精通?代碼\
?????文件??????338671??2015-02-11?10:32??Unity?2D游戲開發從入門到精通?代碼\Unity?2D游戲開發從入門到精通.jpg
?????文件?????????123??2015-02-13?13:52??Unity?2D游戲開發從入門到精通?代碼\Unity?2D游戲開發從入門到精通京東購書.url
?????文件?????3890970??2015-02-09?11:30??Unity?2D游戲開發從入門到精通?代碼\Unity?2D游戲開發從入門到精通試讀.pdf
?????目錄???????????0??2017-08-10?20:38??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\
?????目錄???????????0??2017-08-10?20:37??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\
?????目錄???????????0??2017-08-10?20:38??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\
?????文件????????3517??2014-06-07?10:07??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assembly-CSharp-Editor-vs.csproj
?????文件????????3511??2014-06-07?10:07??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assembly-CSharp-Editor.csproj
?????文件????????3190??2014-06-09?13:36??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assembly-CSharp-vs.csproj
?????文件????????3190??2014-06-09?13:36??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assembly-CSharp.csproj
?????目錄???????????0??2017-08-10?20:37??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\
?????目錄???????????0??2017-08-10?20:38??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Atlas_data\
?????文件??????829087??2014-06-05?16:25??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Atlas_data\Atlas_Texture.png
?????文件?????????951??2014-06-05?16:25??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Atlas_data\Atlas_Texture.png.meta
?????文件????????6848??2014-06-05?17:04??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Atlas_data\atlasdata_Atlas_Texture.prefab
?????文件??????????95??2014-06-05?16:25??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Atlas_data\atlasdata_Atlas_Texture.prefab.meta
?????文件?????????107??2014-06-05?14:51??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Atlas_data.meta
?????目錄???????????0??2017-08-10?20:38??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Editor\
?????文件????????4046??2014-06-05?16:59??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Editor\CreateQuad.cs
?????文件?????????178??2014-06-05?16:59??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Editor\CreateQuad.cs.meta
?????文件????????4129??2014-06-05?16:03??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Editor\TexturePacker.cs
?????文件?????????178??2014-06-05?16:03??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Editor\TexturePacker.cs.meta
?????文件????????3860??2014-06-06?09:17??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Editor\UVEditor.cs
?????文件?????????178??2014-06-06?09:17??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Editor\UVEditor.cs.meta
?????文件?????????107??2014-06-05?14:51??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Editor.meta
?????目錄???????????0??2017-08-10?20:38??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Material\
?????文件????????4240??2014-06-05?18:32??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Material\mat_atlas.mat
?????文件??????????95??2014-06-05?18:13??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Material\mat_atlas.mat.meta
?????文件?????????107??2014-06-05?14:51??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Material.meta
?????目錄???????????0??2017-08-10?20:38??Unity?2D游戲開發從入門到精通?代碼\Unity2D游戲開發?代碼\chapter?10\CardMatch\Assets\Quid\
............此處省略5433個文件信息

評論

共有 條評論