Unity3D三国群英传完整源码
Unity3D三国群英传完整源码
三国群英传是一款由奥汀(Odin)公司出品的策略性小游戏,游戏的角色头像都是采用3d图会制而成的,在百人对百人大对决的战场上,采用了可调整镜头远近、具有3D景观的视角,武将技在高彩模式的画面下有着眩丽的光影效果非不中给力。三国群英传游戏与以往的三国游戏相同的是统一全国,不同的是它的时间(应该说是年代)的表示方法是即时的,也就是说它不是回合制的,而时间是以月来计算的。游戏的重点是战争而非内政,玩家可亲临前线,在沙场上杀敌,也可运筹帷幄。
开发环境Unity3D-4.3.4
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 12292 2013-08-12 22:31 Unity3D三国群英传完整源码Assets.DS_Store
文件 5394 2014-05-29 10:25 Unity3D三国群英传完整源码Assets1.txt
文件 93 2014-05-28 22:56 Unity3D三国群英传完整源码Assets1.txt.meta
文件 6148 2013-08-07 22:31 Unity3D三国群英传完整源码Assetsex2D.DS_Store
文件 6148 2013-08-07 22:29 Unity3D三国群英传完整源码Assetsex2DCore.DS_Store
文件 67584 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DCoreex2D.Runtime.dll
文件 153 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DCoreex2D.Runtime.dll.meta
文件 1141 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlend.shader
文件 111 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlend.shader.meta
文件 2857 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlendClipping.shader
文件 89 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlendClipping.shader.meta
文件 1246 2013-03-03 21:30 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlendNoZTest.shader
文件 89 2013-03-03 21:30 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlendNoZTest.shader.meta
文件 2601 2013-03-03 21:30 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlendPixelPerfect.shader
文件 89 2013-03-03 21:30 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlendPixelPerfect.shader.meta
文件 90 2013-03-03 21:30 Unity3D三国群英传完整源码Assetsex2DCoreShaders.meta
文件 90 2013-03-03 21:30 Unity3D三国群英传完整源码Assetsex2DCore.meta
文件 6148 2013-08-07 22:31 Unity3D三国群英传完整源码Assetsex2DEditor.DS_Store
文件 142336 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DEditorex2D.Editor.dll
文件 153 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DEditorex2D.Editor.dll.meta
文件 6148 2013-08-07 22:29 Unity3D三国群英传完整源码Assetsex2DEditorResource.DS_Store
文件 89 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DEditorResourceorder.png
文件 707 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DEditorResourceorder.png.meta
文件 90 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DEditorResourceox.png
文件 707 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DEditorResourceox.png.meta
文件 2896 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DEditorResourceCheckerboard_64x64.png
文件 709 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DEditorResourceCheckerboard_64x64.png.meta
文件 6046 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DEditorResourceex2d_logo.png
文件 708 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DEditorResourceex2d_logo.png.meta
文件 4200 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DEditorResourceMaterialsCheckerboard_64x64-png.mat
............此处省略15142个文件信息
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
///
/// Inspector class used to edit Inventory Databases.
///
[CustomEditor(typeof(InvDatabase))]
public class InvDatabaseInspector : Editor
{
static int mIndex = 0;
bool mConfirmDelete = false;
///
/// Draw an enlarged sprite within the specified texture atlas.
///
public Rect DrawSprite (Texture2D tex Rect sprite Material mat) { return DrawSprite(tex sprite mat true 0); }
///
/// Draw an enlarged sprite within the specified texture atlas.
///
public Rect DrawSprite (Texture2D tex Rect sprite Material mat bool addPadding)
{
return DrawSprite(tex sprite mat addPadding 0);
}
///
/// Draw an enlarged sprite within the specified texture atlas.
///
public Rect DrawSprite (Texture2D tex Rect sprite Material mat bool addPadding int maxSize)
{
float paddingX = addPadding ? 4f / tex.width : 0f;
float paddingY = addPadding ? 4f / tex.height : 0f;
float ratio = (sprite.height + paddingY) / (sprite.width + paddingX);
ratio *= (float)tex.height / tex.width;
// Draw the checkered background
Color c = GUI.color;
Rect rect = NGUIEditorTools.DrawBackground(tex ratio);
GUI.color = c;
if (maxSize > 0)
{
float dim = maxSize / Mathf.Max(rect.width rect.height);
rect.width *= dim;
rect.height *= dim;
}
// We only want to draw into this rectangle
if (Event.current.type == EventType.Repaint)
{
if (mat == null)
{
GUI.DrawTextureWithTexCoords(rect tex sprite);
}
else
{
// NOTE: DrawPreviewTexture doesn‘t seem to support BeginGroup-based clipping
// when a custom material is specified. It seems to be a bug in Unity.
// Passing ‘null‘ for the material or omitting the parameter clips as expected.
UnityEditor.EditorGUI.DrawPreviewTexture(sprite tex mat);
//UnityEditor.EditorGUI.DrawPreviewTexture(drawRect tex);
//GUI.DrawTexture(drawRect tex);
}
rect = new Rect(sprite.x + rect.x sprite.y + rect.y sprite.width sprite.height);
}
return rect;
}
///
/// Helper function that sets the index to the index of the specified item.
///
public static void SelectIndex (InvDatabase db InvbaseItem item)
{
mIndex = 0;
foreach (InvbaseItem i in db.items)
{
if (i == item) break;
++mIndex;
}
}
///
/// Draw the inspector widget.
///
public override void OnInspectorGUI ()
{
NGUIEditorTools.SetLabelWidth(80f);
InvDatabase db = target as InvDatabase;
NGUIEditorTools.DrawSeparator();
InvbaseItem item = null;
if (db.items == null || db.items.Count == 0)
{
mIndex = 0;
}
else
{
mIndex = Mathf.Clamp(mIndex 0 db.items.Count - 1);
item = db.items[mIndex];
}
if (mConfirmDelete)
{
// Show the confirmation dialog
GUILayout.Label(“Are you sure you want to delete ‘“ + item.name + “‘?“);
NGUI
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 12292 2013-08-12 22:31 Unity3D三国群英传完整源码Assets.DS_Store
文件 5394 2014-05-29 10:25 Unity3D三国群英传完整源码Assets1.txt
文件 93 2014-05-28 22:56 Unity3D三国群英传完整源码Assets1.txt.me
文件 6148 2013-08-07 22:31 Unity3D三国群英传完整源码Assetsex2D.DS_Store
文件 6148 2013-08-07 22:29 Unity3D三国群英传完整源码Assetsex2DCore.DS_Store
文件 67584 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DCoreex2D.Runtime.dll
文件 153 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DCoreex2D.Runtime.dll.me
文件 1141 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlend.shader
文件 111 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlend.shader.me
文件 2857 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlendClipping.shader
文件 89 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlendClipping.shader.me
文件 1246 2013-03-03 21:30 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlendNoZTest.shader
文件 89 2013-03-03 21:30 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlendNoZTest.shader.me
文件 2601 2013-03-03 21:30 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlendPixelPerfect.shader
文件 89 2013-03-03 21:30 Unity3D三国群英传完整源码Assetsex2DCoreShadersSpriteBlendPixelPerfect.shader.me
文件 90 2013-03-03 21:30 Unity3D三国群英传完整源码Assetsex2DCoreShaders.me
文件 90 2013-03-03 21:30 Unity3D三国群英传完整源码Assetsex2DCore.me
文件 6148 2013-08-07 22:31 Unity3D三国群英传完整源码Assetsex2DEditor.DS_Store
文件 142336 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DEditorex2D.Editor.dll
文件 153 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DEditorex2D.Editor.dll.me
文件 6148 2013-08-07 22:29 Unity3D三国群英传完整源码Assetsex2DEditorResource.DS_Store
文件 89 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DEditorResourceorder.png
文件 707 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DEditorResourceorder.png.me
文件 90 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DEditorResourceox.png
文件 707 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DEditorResourceox.png.me
文件 2896 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DEditorResourceCheckerboard_64x64.png
文件 709 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DEditorResourceCheckerboard_64x64.png.me
文件 6046 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DEditorResourceex2d_logo.png
文件 708 2013-07-18 19:56 Unity3D三国群英传完整源码Assetsex2DEditorResourceex2d_logo.png.me
文件 4200 2012-05-11 19:01 Unity3D三国群英传完整源码Assetsex2DEditorResourceMaterialsCheckerboard_64x64-png.mat
............此处省略15142个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)