• 大小: 39.37MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-08
  • 语言: 其他
  • 标签: Unity  

资源简介

基于Unity3d 局域网下可以联机的坦克小游戏源码(发布后需要打开两个运行程序,一个用于创建服务器,另一个输入主机IP(通局域网下)后可以实现联机)在同一台电脑上运行时默认的IP都是127.0.0.1

资源截图

代码片段和文件信息

using System;
using UnityEngine;

namespace UnityStandardAssets.ImageEffects
{
    public enum AAMode
    {
        FXAA2 = 0
        FXAA3Console = 1
        FXAA1PresetA = 2
        FXAA1PresetB = 3
        NFAA = 4
        SSAA = 5
        DLAA = 6
    }

    [ExecuteInEditMode]
    [RequireComponent(typeof (Camera))]
    [AddComponentMenu(“Image Effects/Other/Antialiasing“)]
    public class Antialiasing : PostEffectsbase
    {
        public AAMode mode = AAMode.FXAA3Console;

        public bool showGeneratedNormals = false;
        public float offsetScale = 0.2f;
        public float blurRadius = 18.0f;

        public float edgeThresholdMin = 0.05f;
        public float edgeThreshold = 0.2f;
        public float edgeSharpness = 4.0f;

        public bool dlaaSharp = false;

        public Shader ssaaShader;
        private Material ssaa;
        public Shader dlaaShader;
        private Material dlaa;
        public Shader nfaaShader;
        private Material nfaa;
        public Shader shaderFXAAPreset2;
        private Material materialFXAAPreset2;
        public Shader shaderFXAAPreset3;
        private Material materialFXAAPreset3;
        public Shader shaderFXAAII;
        private Material materialFXAAII;
        public Shader shaderFXAAIII;
        private Material materialFXAAIII;


        public Material CurrentAAMaterial()
        {
            Material returnValue = null;

            switch (mode)
            {
                case AAMode.FXAA3Console:
                    returnValue = materialFXAAIII;
                    break;
                case AAMode.FXAA2:
                    returnValue = materialFXAAII;
                    break;
                case AAMode.FXAA1PresetA:
                    returnValue = materialFXAAPreset2;
                    break;
                case AAMode.FXAA1PresetB:
                    returnValue = materialFXAAPreset3;
                    break;
                case AAMode.NFAA:
                    returnValue = nfaa;
                    break;
                case AAMode.SSAA:
                    returnValue = ssaa;
                    break;
                case AAMode.DLAA:
                    returnValue = dlaa;
                    break;
                default:
                    returnValue = null;
                    break;
            }

            return returnValue;
        }


        public override bool CheckResources()
        {
            CheckSupport(false);

            materialFXAAPreset2 = CreateMaterial(shaderFXAAPreset2 materialFXAAPreset2);
            materialFXAAPreset3 = CreateMaterial(shaderFXAAPreset3 materialFXAAPreset3);
            materialFXAAII = CreateMaterial(shaderFXAAII materialFXAAII);
            materialFXAAIII = CreateMaterial(shaderFXAAIII materialFXAAIII);
            nfaa = CreateMaterial(nfaaShader nfaa);
            ssaa = CreateMateria

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-04-17 22:06  Unet02\
     目录           0  2018-04-17 14:26  Unet02\.vs\
     目录           0  2018-04-17 14:26  Unet02\.vs\Unet02\
     目录           0  2018-04-17 14:26  Unet02\.vs\Unet02\v15\
     文件      147968  2018-04-17 21:42  Unet02\.vs\Unet02\v15\.suo
     目录           0  2018-04-17 14:26  Unet02\.vs\Unet02\v15\Server\
     目录           0  2018-04-17 21:42  Unet02\.vs\Unet02\v15\Server\sqlite3\
     文件           0  2018-04-17 14:26  Unet02\.vs\Unet02\v15\Server\sqlite3\db.lock
     文件      958464  2018-04-17 21:42  Unet02\.vs\Unet02\v15\Server\sqlite3\storage.ide
     目录           0  2018-04-17 15:06  Unet02\Assets\
     目录           0  2018-04-17 14:26  Unet02\Assets\Res\
     目录           0  2018-04-17 22:07  Unet02\Assets\Res\01TankWar\
     文件         192  2017-07-21 09:59  Unet02\Assets\Res\01TankWar.meta
     目录           0  2018-04-17 14:24  Unet02\Assets\Res\AudioClips\
     文件    12700880  2015-10-23 22:17  Unet02\Assets\Res\AudioClips\BackgroundMusic.wav
     文件         449  2015-10-23 22:17  Unet02\Assets\Res\AudioClips\BackgroundMusic.wav.meta
     文件      751752  2015-10-23 22:17  Unet02\Assets\Res\AudioClips\EngineDriving.aif
     文件         449  2015-10-23 22:17  Unet02\Assets\Res\AudioClips\EngineDriving.aif.meta
     文件     1153278  2015-10-23 22:16  Unet02\Assets\Res\AudioClips\EngineIdle.aif
     文件         449  2015-10-23 22:16  Unet02\Assets\Res\AudioClips\EngineIdle.aif.meta
     文件      176648  2015-10-23 22:16  Unet02\Assets\Res\AudioClips\ShellExplosion.wav
     文件         449  2015-10-23 22:16  Unet02\Assets\Res\AudioClips\ShellExplosion.wav.meta
     文件      352880  2015-10-23 22:17  Unet02\Assets\Res\AudioClips\ShotCharging.wav
     文件         449  2015-10-23 22:17  Unet02\Assets\Res\AudioClips\ShotCharging.wav.meta
     文件      264680  2015-10-23 22:16  Unet02\Assets\Res\AudioClips\ShotFiring.wav
     文件         449  2015-10-23 22:16  Unet02\Assets\Res\AudioClips\ShotFiring.wav.meta
     文件      264680  2015-10-23 22:16  Unet02\Assets\Res\AudioClips\TankExplosion.wav
     文件         449  2015-10-23 22:16  Unet02\Assets\Res\AudioClips\TankExplosion.wav.meta
     文件         193  2015-10-23 22:16  Unet02\Assets\Res\AudioClips.meta
     目录           0  2018-04-17 14:25  Unet02\Assets\Res\AudioMixers\
     文件        5875  2018-04-17 14:25  Unet02\Assets\Res\AudioMixers\CompleteMainMix.mixer
............此处省略2572个文件信息

评论

共有 条评论