Unity3D 坦克射击游戏完整工程文件


Unity3D 坦克射击游戏(完整工程文件)亲测能用!而且可以直接玩,很有参考价值
资源截图
代码片段和文件信息
using UnityEngine;
using System.Collections;

[ExecuteInEditMode]
[AddComponentMenu(“Image Effects/Blur“)]
public class BlurEffect : MonoBehaviour
{
/// Blur iterations - larger number means more blur.
public int iterations = 3;

/// Blur spread for each iteration. Lower values
/// give better looking blur but require more iterations to
/// get large blurs. Value is usually between 0.5 and 1.0.
public float blurSpread = 0.6f;


// --------------------------------------------------------
// The blur iteration shader.
// Basically it just takes 4 texture samples and averages them.
// By applying it repeatedly and spreading out sample locations
// we get a Gaussian blur approximation.

private static string blurMatString =
@“Shader ““BlurConeTap““ {
Properties { _MainTex (““““ any) = ““““ {} }
SubShader {
Pass {
ZTest Always Cull Off ZWrite Off Fog { Mode Off }
SetTexture [_MainTex] {constantColor (0000.25) combine texture * constant alpha}
SetTexture [_MainTex] {constantColor (0000.25) combine texture * constant + previous}
SetTexture [_MainTex] {constantColor (0000.25) combine texture * constant + previous}
SetTexture [_MainTex] {constantColor (0000.25) combine texture * constant + previous}
}
}
Fallback off
}“;

static Material m_Material = null;
protected static Material material {
get {
if (m_Material == null) {
m_Material = new Material( blurMatString );
m_Material.hideFlags = HideFlags.HideAndDontSave;
m_Material.shader.hideFlags = HideFlags.HideAndDontSave;
}
return m_Material;

}

protected void OnDisable() {
if( m_Material ) {
DestroyImmediate( m_Material.shader );
DestroyImmediate( m_Material );
}
}

// --------------------------------------------------------

protected void Start()
{
// Disable if we don‘t support image effects
if (!SystemInfo.supportsImageEffects) {
enabled = false;
return;
}
// Disable if the shader can‘t run on the users graphics card
if (!material.shader.isSupported) {
enabled = false;
return;
}
}

// Performs one blur iteration.
public void FourTapCone (RenderTexture source RenderTexture dest int iteration)
{
float off = 0.5f + iteration*blurSpread;
Graphics.BlitMultiTap (source dest material
new Vector2(-off -off)
new Vector2(-off  off)
new Vector2( off  off)
new Vector2( off -off)
);
}

// Downsamples the texture to a quarter resolution.
private void DownSample4x (RenderTexture source RenderTexture dest)
{
float off = 1.0f;
Graphics.BlitMultiTap (source dest material
new Vector2(-off -off)
new Vector2(-off  off)
new Vector2( off  off)
new Vector2( off -off)
);
}

// Called by the camera to apply the image effect
void OnRenderImage (RenderTexture source RenderTexture destination) {
RenderTexture buffer = RenderTexture.GetTemporary(source.width/4 source.height/4 0);
RenderTexture buffer2 = RenderTexture.GetTemp

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      10427  2011-05-03 00:41  Tank Battle(完整工程文件)AssetsAnimationsdoor_open.anim

     文件      15136  2011-05-09 01:04  Tank Battle(完整工程文件)AssetsAudio8.WAV

     文件       7957  2011-05-09 01:02  Tank Battle(完整工程文件)AssetsAudio11.WAV

     文件      11308  2011-05-09 02:21  Tank Battle(完整工程文件)AssetsAudio412.wav

     文件      17454  2011-05-04 17:15  Tank Battle(完整工程文件)Assetsexplosion.prefab

     文件       5412  2010-01-27 10:27  Tank Battle(完整工程文件)AssetsGUIBulletCountPic.png

     文件      25584  2004-10-20 20:37  Tank Battle(完整工程文件)AssetsGUIgunplay 1.ttf

     文件      25584  2004-10-20 20:37  Tank Battle(完整工程文件)AssetsGUIgunplay.ttf

     文件        559  2010-01-29 11:25  Tank Battle(完整工程文件)AssetsGUIhealthh00.png

     文件        923  2010-01-29 11:24  Tank Battle(完整工程文件)AssetsGUIhealthh10.png

     文件        955  2010-01-29 11:24  Tank Battle(完整工程文件)AssetsGUIhealthh20.png

     文件        988  2010-01-29 11:23  Tank Battle(完整工程文件)AssetsGUIhealthh30.png

     文件        882  2010-01-29 11:23  Tank Battle(完整工程文件)AssetsGUIhealthh40.png

     文件        978  2010-01-29 11:23  Tank Battle(完整工程文件)AssetsGUIhealthh50.png

     文件        980  2010-01-29 11:23  Tank Battle(完整工程文件)AssetsGUIhealthh60.png

     文件        873  2010-01-29 11:22  Tank Battle(完整工程文件)AssetsGUIhealthh70.png

     文件        943  2010-01-29 11:22  Tank Battle(完整工程文件)AssetsGUIhealthh80.png

     文件      23469  2011-05-09 01:30  Tank Battle(完整工程文件)AssetsLevelsMenu.unity

     文件     334248  2011-05-09 02:45  Tank Battle(完整工程文件)AssetsLevelsScene01.unity

     文件       3577  2011-05-01 23:29  Tank Battle(完整工程文件)AssetsMaterialscratecrate_material.mat

     文件    2155315  2010-01-25 13:12  Tank Battle(完整工程文件)AssetsMaterialscrateCrate_metal.png

     文件     922530  2010-01-25 13:18  Tank Battle(完整工程文件)AssetsMaterialscrateCrate_metal_n.png

     文件     213654  2010-01-26 13:32  Tank Battle(完整工程文件)AssetsMaterialscrateGrenadesGrenadeCrate 1.jpg

     文件     213654  2010-01-26 13:32  Tank Battle(完整工程文件)AssetsMaterialscrateGrenadesGrenadeCrate.jpg

     文件       3539  2011-05-04 17:13  Tank Battle(完整工程文件)AssetsMaterialscrateGrenadesNew Material.mat

     文件    3145784  2006-03-20 15:26  Tank Battle(完整工程文件)AssetsModels1M1_ABRAM.bmp

     文件     228556  2006-03-20 15:32  Tank Battle(完整工程文件)AssetsModels1M1_Abrams.3DS

     文件       3360  2011-04-26 13:11  Tank Battle(完整工程文件)AssetsModels1Materialsm1_abram.mat

     文件    4231872  2006-05-02 16:41  Tank Battle(完整工程文件)AssetsModelsAudi_Q7Audi_Q7.fbx

     文件      16753  2006-04-27 06:21  Tank Battle(完整工程文件)AssetsModelsAudi_Q7acklght.jpg

............此处省略1480个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)