荣耀彩票代理

  • 热门专题

Unity AngryBots愤怒的机器人demo研究

作者:HONT  发布日期:2016-11-24 21:08:21
  • 荣耀彩票代理ZUOWEIUnityZAOQIDEJINGDIANdemo,YIZHICONG3.5YIHOUYANYONGDAO4.7.xBANBEN。DANQINEIBUYIXIEZUOFASHIFENBUHELI。BIRUSHIYONGGUODUODEGENMULU,

    CHUANGJIANGUAIWUHEWANJIABUYONGSpawnPoint。AI、CheckPointDEDAIMASHIXIANGUOYUSUIYI,DAIMAMINGMINGFENGGEGUIYIDENGDENG。。

    BINGQIEWANGSHANGYEYOUHENDUOXIANGGUANDEXUEXIWENZHANG,SUOYIWOJINGJIANLEYIXIA,JIANGYIXIEYOUYONGDEBUFENXUEXIBINGJILUXIALAI

    1.主角武器部分

    WeaponSlotWEIWUQIZHUYAOGameObjectJIEDIAN,LIMIANYOUGEZHONGXIANGGUANJIAOBEN。

    QIZHONGMIAOZHUNXIAN(LaserScope)TONGGUOLineRendererSHIXIAN:

    QIShaderEWAIJIALEYIGENoiseXIAOGUO,RANHOUTONGGUOJIAOBENGAIBIANuvWEIZHIHESUOFANG。JIAOBENWEILaserScope,shaderLUJINGAngryBots/FX/LaserScope

    ERYINGSHEZAIMUBIAOSHANGDEDIANSHIYONGMIANPIAN,BINGGENJUMEIZHENFASHEDESHEXIANQUDEFAXIANFANGXIANGXIUGAIWEIZHIHEFANGXIANG。SHIXIANYEZAILaserScopeLI

    LINGWAI,WEILEFANGZHIMEIYIZHENDUOCIQUDESHEXIANDAOZHIDEKAIXIAO,ZHUANMENYOUYIGEJIAOBENPerFrameRaycastHUANCUNSHEXIANNEIRONG,BINGQIEMEIZHENGENGXIN。

    复制代码
    function Awake () {
        tr = transform;
    }
    
    function Update () {
        // Cast a ray to find out the end point of the laser
        hitInfo = RaycastHit ();
        Physics.Raycast (tr.position, tr.forward, hitInfo);
    }
    
    function GetHitInfo () : RaycastHit {
        return hitInfo;
    }
    复制代码

    2.雨水实现

    YUSHUIDEZUOFABINGFEIZHULIUDEZAIXIANGJIQIANJIAYIGEKUAIZHUANGDELIZIFASHEQI。ERSHIYONGMeshDEYIDONGLAISHIXIAN

    JUTIJIAOBENZAIRainBoxZHONG,BINGTONGGUORainManagerHUOQUCHUCUNDEYUDIANMesh。MEIYIGEMeshDOUBAOHANRUOGANYUDIANMIANPIAN

    LUOZAIDISHANGDELIANYIYESHIBAOHANRUOGANMIANPIANDEMesh,BINGQIEYOUDUOGE。QIJIAOBENZAIRainsplashBoxZHONG,TONGGUOShader(AngryBots/FX/RainSplash)LAIBOFANGLIANYIDEZHENLIETU

    shaderZHONGGENJUBUTONGZUOBIAO,QUDEBUTONGBOFANGSHIJIAN:

    half timeVal = frac(_Time.z * 0.5 + v.texcoord1.x) * 2.0;

    LINGWAIQIZHONGYICHUXUNHUANQUSHUZUYUANSUDEJIAOBENBIJIAOYOUQU(ZUOLEXIAXIUGAI):

    复制代码
    int mIndex;
    
    
    void Update()
    {
        var collectionLength = 5;
        var a = (mIndex++) % collectionLength;
    
        Debug.Log('a: ' + a);//0,1,2,3,4 ... 0,1,2,3,4
    }
    复制代码

    3.反射实现

    荣耀彩票代理MEIXIANGDAOJURANZUOLESHISHIDEFANSHE:

    荣耀彩票代理QIZUOFABIJIAOJINGDIAN,TONGGUOYIGEFANSHEXIANGJIHUODEFANSHENEIRONG,BINGYONGCENGMaskGUOLVDIMIANDENGNEIRONG,QUDAOSHUIPINGXIANDEDIAN,CHENGYIFANSHEJUZHENDEDAOFANSHEWEIZHI。

    荣耀彩票代理JIAOBENZAIReflectionFxZHONG,CANSHURUXIA:

    几项重要参数:

    Reflective ObjectFANSHEDEDUIXIANG,ZHEILIZHISHIYONGZHEIGEJIHELIDEYUANSUQUYIGEZUIJINWEIZHI,BINGZUOWEISHUIPINGMIANCANKAODEDAOFANSHEDIAN。

    Reflective Materials FANSHECAIZHI,YONGYUBADEDAODERenderTextureDIUDAOLIMIAN,Reflecction SamplerSHIFUZHIDETexTONGDAOMINGCHENG。

    Replacement Shader CHULIFANSHEDEShader,RUGUOYAONALAIYONGKEYIZHIJIEKAOBEIGAIXIANGMULIDE

    MUQIANYIJINGDAOLEUnity5,JINGMIANFANSHEDECHULIFANGFAYIJINGFEICHANGDUOLE,ZHEILIMEIJULIANGGE:

    The BlacksmithLIDEDAIMOHUXIAOGUODEGAOZHILIANGJINGMIANFANSHE:http://www.cnblogs.com/hont/p/5658491.html

    SHIYONGFANSHETANTOUSHIXIANDEDEJINGMIANFANSHE: http://www.cnblogs.com/hont/p/6091055.html

    另外,关于传统实时镜面反射实现,这里还有一个文章推荐:http://gad.qq.com/article/detail/7157554

    4.其他内容补充

    荣耀彩票代理1.YOUXITUXIANGPINZHIGUANLIWEIYUQualityManagerZHONG,QIZHONGShaderDatabaseJIAOBENCHUCUNshaderXINXI,BINGZAIXIUGAIPINZHISHIDUIshader maximum LODJINXINGPILIANGXIUGAI。

    2.MaterialImpactManagerLICUNFANGDESHIWULICAIZHIHEYINXIAODEYINGSHEBIAO

    荣耀彩票代理3.ReflectiveBackgroundArbitraryDEShaderLIZHIJIEDUDAOLightMap,DUIYUYOUYAOQUDAOLightmapXUQIUDEShader,KEYICANKAOZHEIGE。

    荣耀彩票代理4.DANGQIANHUANJINGDESEDIAODENGNEIRONGGUANLIFANGZAIMoodBoxLI,BAOKUOMoodBoxManager,ZHEITAODONGXITONGCHENGWEIMoodBox System。WOBUTAIQUEDINGMoodZHEIZHONGMINGMINGSHIFOUGUANFANG,XIANJIXIA。

    5.EditorXIAYOUYIGEDAOCHUobjGONGJU.DAOCHUHOUZAIExportedObjWENJIANJIAXIA,KEYIZHIJIEDAOCHU.objGESHIMOXING,DANSHIXUDUOXIXIAODELINGJIANMOXING,ERBINGFEIZHENGHEDE。

    6.EditorXIAHAIYOUYIGETIANKONGHESHENGCHENGQIHECubemapSHENGCHENGQI,ZHIXUYAOTIGONGYIGEDIAN,JIKEFUZHUSHENGCHENG

    7.Patrol Route XUNLUOLUXIANJIAOBEN,YEKEYIHUIZHIQUXIAN

About IT165 - 广告服务 - 隐私声明 - 版权申明 - 免责条款 - 网站地图 - 网友投稿 - 联系方式
本站内容来自于互联网,仅供用于网络技术学习,学习中请遵循相关法律法规