资源简介
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(完整工程文件)\Assets\Animations\door_open.anim
文件 15136 2011-05-09 01:04 Tank Battle(完整工程文件)\Assets\Audio\08.WAV
文件 7957 2011-05-09 01:02 Tank Battle(完整工程文件)\Assets\Audio\11.WAV
文件 11308 2011-05-09 02:21 Tank Battle(完整工程文件)\Assets\Audio\412.wav
文件 17454 2011-05-04 17:15 Tank Battle(完整工程文件)\Assets\explosion.prefab
文件 5412 2010-01-27 10:27 Tank Battle(完整工程文件)\Assets\GUI\BulletCountPic.png
文件 25584 2004-10-20 20:37 Tank Battle(完整工程文件)\Assets\GUI\gunplay 1.ttf
文件 25584 2004-10-20 20:37 Tank Battle(完整工程文件)\Assets\GUI\gunplay.ttf
文件 559 2010-01-29 11:25 Tank Battle(完整工程文件)\Assets\GUI\health\h00.png
文件 923 2010-01-29 11:24 Tank Battle(完整工程文件)\Assets\GUI\health\h10.png
文件 955 2010-01-29 11:24 Tank Battle(完整工程文件)\Assets\GUI\health\h20.png
文件 988 2010-01-29 11:23 Tank Battle(完整工程文件)\Assets\GUI\health\h30.png
文件 882 2010-01-29 11:23 Tank Battle(完整工程文件)\Assets\GUI\health\h40.png
文件 978 2010-01-29 11:23 Tank Battle(完整工程文件)\Assets\GUI\health\h50.png
文件 980 2010-01-29 11:23 Tank Battle(完整工程文件)\Assets\GUI\health\h60.png
文件 873 2010-01-29 11:22 Tank Battle(完整工程文件)\Assets\GUI\health\h70.png
文件 943 2010-01-29 11:22 Tank Battle(完整工程文件)\Assets\GUI\health\h80.png
文件 23469 2011-05-09 01:30 Tank Battle(完整工程文件)\Assets\Levels\Menu.unity
文件 334248 2011-05-09 02:45 Tank Battle(完整工程文件)\Assets\Levels\Scene01.unity
文件 3577 2011-05-01 23:29 Tank Battle(完整工程文件)\Assets\Materials\crate\crate_material.mat
文件 2155315 2010-01-25 13:12 Tank Battle(完整工程文件)\Assets\Materials\crate\Crate_me
文件 922530 2010-01-25 13:18 Tank Battle(完整工程文件)\Assets\Materials\crate\Crate_me
文件 213654 2010-01-26 13:32 Tank Battle(完整工程文件)\Assets\Materials\crateGrenades\GrenadeCrate 1.jpg
文件 213654 2010-01-26 13:32 Tank Battle(完整工程文件)\Assets\Materials\crateGrenades\GrenadeCrate.jpg
文件 3539 2011-05-04 17:13 Tank Battle(完整工程文件)\Assets\Materials\crateGrenades\New Material.mat
文件 3145784 2006-03-20 15:26 Tank Battle(完整工程文件)\Assets\Models\1\M1_ABRAM.bmp
文件 228556 2006-03-20 15:32 Tank Battle(完整工程文件)\Assets\Models\1\M1_Abrams.3DS
文件 3360 2011-04-26 13:11 Tank Battle(完整工程文件)\Assets\Models\1\Materials\m1_abram.mat
文件 4231872 2006-05-02 16:41 Tank Battle(完整工程文件)\Assets\Models\Audi_Q7\Audi_Q7.fbx
文件 16753 2006-04-27 06:21 Tank Battle(完整工程文件)\Assets\Models\Audi_Q7\backlght.jpg
............此处省略1480个文件信息
相关资源
- Unity纪念碑谷.rar
- Unity3d实现扭动挤压浏览效果
- unity案例入门坦克大战源码
- Unity3D游戏开发.pdf 宣雨松著完整高清
- Unity3D版水果忍者
- unity3d爆炸特效包
- unity3d_见缝插针源码及报告.zip
- Unity3d车库场景模型
- unity3d 警察动画模型
- unity3D 新手引导遮罩,支持圆形和矩形
- unity3d枪支武器包FPS第一人称射击游戏
- unity3d制作贪吃蛇
- unity3D暴力街区射击大战游戏源码
- Unity3D 实战视频教程 保卫萝卜 2D 游戏
- unity3d调用中央气象局城市天气数据,
- Unity 3D Paint in 3D (1.7.3)
- 2014年最新最好的Unity3d圣典之中文脚本
- Unity3D搓牌效果支持4个方向
- Unity3D课程设计 模拟火焰效果
- 贝塞尔曲线的unity3d实现
- [资源插件]Unity3D_UGUI HUD Text v1.4.1.zip
- ShaderlabVSCode 1.1.6.unitypackage
- Camera Path Animator unity3d 插件
- Unity录屏模块封装清晰的可调AVPro Mo
- FBX格式人物模型,资源齐全,带动画
- Unity3D 3D炸弹超人Demo
- unity3d坐标轴插件
- 龙腾简合unity工程师笔试题
- Terrain Assets.unitypackageUnity3d官方资源包
- Unity3D的仿真手模型,适用Leapmotion与
评论
共有 条评论