资源简介
人机对战的游戏,在unity3d中直接复制粘贴到assets文件夹中,在直接运行中的town场景即可
代码片段和文件信息
using UnityEngine;
using System.Collections;
using UnityEditor;
using UnityEngine.UI;
using System.Collections.Generic;
namespace ChobiAssets.KTP
{
[ CustomEditor (typeof(Track_Deform_CS))]
public class Track_Deform_CSEditor : Editor
{
SerializedProperty anchorNumProp;
SerializedProperty anchorArrayProp;
SerializedProperty widthArrayProp;
SerializedProperty heightArrayProp;
SerializedProperty offsetArrayProp;
void OnEnable ()
{
anchorNumProp = serializedobject.FindProperty (“anchorNum“);
anchorArrayProp = serializedobject.FindProperty (“anchorArray“);
widthArrayProp = serializedobject.FindProperty (“widthArray“);
heightArrayProp = serializedobject.FindProperty (“heightArray“);
offsetArrayProp = serializedobject.FindProperty (“offsetArray“);
}
public override void OnInspectorGUI ()
{
Set_Inspector ();
if (GUI.changed) {
Set_Vertices ();
}
if (Event.current.commandName == “UndoRedoPerformed“) {
Set_Vertices ();
}
}
void Set_Inspector ()
{
if (EditorApplication.isPlaying == false) {
GUI.backgroundColor = new Color (1.0f 1.0f 0.5f 1.0f);
serializedobject.Update ();
EditorGUILayout.Space ();
if (GUILayout.Button (“Find RoadWheels [ Left ]“ GUILayout.Width (200))) {
Find_RoadWheels (true);
}
if (GUILayout.Button (“Find RoadWheels [ Right ]“ GUILayout.Width (200))) {
Find_RoadWheels (false);
}
EditorGUILayout.IntSlider (anchorNumProp 1 64 “Number of Anchor Wheels“);
EditorGUILayout.Space ();
anchorArrayProp.arraySize = anchorNumProp.intValue;
widthArrayProp.arraySize = anchorNumProp.intValue;
heightArrayProp.arraySize = anchorNumProp.intValue;
offsetArrayProp.arraySize = anchorNumProp.intValue;
for (int i = 0; i < anchorArrayProp.arraySize; i++) {
anchorArrayProp.GetArrayElementAtIndex (i).objectReferenceValue = EditorGUILayout.objectField (“Anchor Wheel“ anchorArrayProp.GetArrayElementAtIndex (i).objectReferenceValue typeof(Transform) true);
EditorGUILayout.Slider (widthArrayProp.GetArrayElementAtIndex (i) 0.0f 10.0f “Weight Width“);
EditorGUILayout.Slider (heightArrayProp.GetArrayElementAtIndex (i) 0.0f 10.0f “Weight Height“);
EditorGUILayout.Slider (offsetArrayProp.GetArrayElementAtIndex (i) -10.0f 10.0f “Offset“);
EditorGUILayout.Space ();
}
// Update Value
EditorGUILayout.Space ();
EditorGUILayout.Space ();
if (GUILayout.Button (“Update Values“)) {
Set_Vertices ();
}
EditorGUILayout.Space ();
EditorGUILayout.Space ();
//
serializedobject.ApplyModifiedProperties ();
}
}
void Set_Vertices ()
{
Gameobject thisGameobject = Selection.activeGameobject;
if (thisGameobject.GetComponent ().sharedMesh == null) {
Debug.LogError (“Mesh is not assigned in the Mesh Filter.“);
return;
}
PrefabUtility.Dis
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 193 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets.me
目录 0 2018-06-19 19:00 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\
文件 193 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Editor.me
目录 0 2018-06-19 18:59 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Editor\
文件 6953 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Editor\Track_Deform_CSEditor.cs
文件 264 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Editor\Track_Deform_CSEditor.cs.me
文件 2727 2017-06-01 14:16 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Editor\Track_Scroll_CSEditor.cs
文件 264 2017-06-01 14:16 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Editor\Track_Scroll_CSEditor.cs.me
文件 193 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes.me
目录 0 2018-06-19 19:00 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\
文件 193 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Bullet.me
目录 0 2018-06-19 18:59 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Bullet\
文件 193 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Bullet\Materials.me
目录 0 2018-06-19 18:59 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Bullet\Materials\
文件 1386 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Bullet\Materials\Bullet_ba
文件 1357 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Bullet\Materials\Bullet_ba
文件 2130 2018-06-18 20:54 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Bullet\Materials\Bullet_ba
文件 181 2017-06-01 14:16 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Bullet\Materials\Bullet_ba
文件 21452 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Bullet\SD_Bullet.fbx
文件 2104 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Bullet\SD_Bullet.fbx.me
文件 193 2017-06-01 14:16 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Props.me
目录 0 2018-06-19 18:59 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Props\
文件 1939 2018-06-18 20:54 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Props\For_Grass.mat
文件 181 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Props\For_Grass.mat.me
文件 1938 2018-06-18 20:54 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Props\For_Sand.mat
文件 181 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Props\For_Sand.mat.me
文件 1939 2018-06-18 20:54 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Props\For_Stone.mat
文件 181 2017-06-01 14:16 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Props\For_Stone.mat.me
文件 1939 2018-06-18 20:54 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Props\For_Water.mat
文件 181 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Props\For_Water.mat.me
文件 193 2017-06-01 14:17 Kawaii_Tanks_Project\Kawaii_Tanks_Assets\Meshes\Props\Ground_Tile.me
............此处省略295个文件信息
相关资源
- Secrets of self made millionaires
- 人工智能:复杂问题求解的结构和策
- Direct3D游戏编程入门教程2
- D3D三层Texture纹理经像素着色器实现渲
- ffmpeg实现dxva2硬件加速
- 《机器人学导论原书第3版》 John J.C
- a course in game theory 影印版
- GameAssassin
- unity3d 吃豆人
- 基于Unity3D的2d拾宝游戏
- D3D11_SkeletonAnimation.rar
- NGUI 3.12.1
- 数据可视化大屏的css背景+边框+demo
- 仿制紫禁城的3D模型
- AIX系统管理培训课程
- 四六级词汇打字游戏Unity3D含源码
- 愤怒的小鸟Unity3d
- unity3d-火焰特效
- 3D Flash Memories
- Neitra_3D_Demo-v0.02x64.7z
- 《多媒体CAI课件制作基础教程第四版
- 基于OpenGL的3D旋转魔方
- WebGL Programming Guide Interactive 3D Graphic
- DirectX实时渲染技术详解第二部分含源
- 深度学习(AI圣经).pdf+源码.
- 视觉几何经典著作An Invitation to 3D Vi
- b5513a735025038fee3d083ccb02b48a.rar
- 公众号源码AI面相手相AI面相研究院无
- Raize Components 5.5
- unity3D素材----UI界面包.zip
评论
共有 条评论