自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 资源 (7)
  • 收藏
  • 关注

转载 unity算法-斜抛运动(变种)

转载链接:https://www.cnblogs.com/lyh916/p/10415954.html[Unity算法]斜抛运动(变种)之前的斜抛运动,如果运动到游戏中,显然是太呆板了,那么可以试着加入一些效果,让它看起来更生动一些,类似游戏中的击飞或者掉落效果:1.在达到最高点的时间点±X的时间段内,会有“减速”效果,形成一种在空中停留的感觉2.落地后,反弹一次,再落地,就像是与地面发生了碰撞相关公式:```csharpusing System;using UnityEngine;p

2021-11-05 17:51:44 337

原创 Lua的print

在lua中print的扩展输出:local raw_print = printlocal function printTable(t) if type(t) == "table" then for _,v in pairs(t) do if type(v) == "table" then printTable(v) else raw_print(v)

2021-09-27 10:29:17 3983

原创 LayaUI做圆形倒计时

Laya引擎制作圆形倒计时(比如游戏中技能图标的倒计时)核心功能:使用IDE中的扇形Pie组件IDE具体操作为:父节点:shenfu的图片是第一个子节点是kuang2.png 第二个子节点:扇形组件 最后一个即是技能图代码部分:主要是改变扇形的大小即可```typescript let time = 0; if (((this.owner as Laya.MeshSprite3D).getComponent(HeroInfoManange) as He

2021-04-09 10:02:18 485

原创 laya中的贝塞尔曲线

class BezierPath{public static CreateBezierPoints(anchorpoints, pointsAmount):Array {var points = [];for (var i = 0; i < pointsAmount; i++) {var point = this.MultiPointBezier(anchorpoints, i / pointsAmount);points.push(point);}return points;}pr

2020-07-24 11:47:17 930

转载 二次贝塞尔曲线的简单应用

using System.Collections;using System.Collections.Generic;using UnityEngine;public class BezierUtils{ /// <summary> /// 根据T值,计算贝塞尔曲线上面相对应的点 /// </summary> /// <param name="t"></param>T值 /// <param name="p...

2020-07-24 11:43:43 245

原创 Laya引擎获取IDE上面的ui组件的方法

第一种:直接拖入组件上:前提是要写一段代码(这种方法不建议使用)第二种:使用var值,在IDE面板上对组件中的var值进行更改:然后可以通过代码获取直接可以使用,当然这个声明也可以放在layaMaxUI上,但是还是不建议放在里面第三种:通过获取节点名字getChildByName前提是IDE组件上的名字要有:然后前面声明变量,后面调用代码...

2020-06-18 11:03:02 1151

原创 laya图集的简单使用

Laya.loader.load("res/atlas/图集名称.atlas",Laya.Handler.create(this,()=>{ let sp = Laya.loader.getRes("图集名称/单张图片.png") as Laya.Texture; // ……直接拿sp使用即可//显示一张图片let mySprite:Laya.Sprite = new Laya.Sprite();mySprite.loadImage("images/9.png");my...

2020-06-16 10:58:43 914

原创 Unity判断某个物体是否在某个规定的区域

Unity自带的两种写法:①物体的位置是否在某个区域内Vector3 pos = someRenderer.transform.position;Bounds bounds = myBoxCollider.bounds;bool rendererIsInsideTheBox = bounds.Contains(pos);②物体的矩形与区域的矩形是否交叉Bounds rendererBo...

2020-05-06 16:56:23 14171

原创 Unity3D碰撞检测的方法

1.需要在碰撞物体上加Collider,如果将collider的isTrigger打上勾的话就可以使用如下方法:private void OnTriggerEnter(Collider other) //检测函数,并将检测的结果放入other变量中.{if (other.gameObject.tag==“player”) //将检测结果的碰撞对象 标签与player标签对比....

2020-04-08 22:04:22 2983

原创 steamVR抓取物体代码

private steamVR_TrackedObject trackedObject;//表示能够获取的物体private steanVR_Controller.Device device;private GameObject interactBox;//void Start(){trackedObject = GetComponent<SteamVr_TrackedObject...

2019-11-19 13:37:40 1012

原创 打包Android时报错

在用Unity2018打包Android时出现了错误:CommandInvokationFailure: Gradle build failed.C:/Program Files/Java/jdk1.8.0_131\bin\java.exe -classpath “D:\unity2018.3.0f2\Unity\Editor\Data\PlaybackEngines\AndroidPlay...

2019-07-11 13:36:13 854

原创 Unity单例模板类

单例模板类:以下代码解决了每个单例类都需要重复写同样代码的问题,基本上算一个比较好的解决方案。public sealed class SingletonTemplate : MonoBehaviour where T : MonoBehaviour{private static volatile T instance;private static object syncRoot = new...

2019-07-11 13:28:47 178

Best Ocean 1.0.7z

Requires Unity 2018.3.0 or higher. Please set the color space to linear space. This time, the sea surface is developed with priority. It mimics the realization of the sea surface in 2017 siggraph, and tries to restore the effect. At the same time, due to performance limitations, the complex parts are simplified as much as possible, and the effect is maximized. Seawater has a number of parameters that can be controlled, including lighting, disturbances, scattering, caustics, etc., so you can add a very good sea experience to your game.

2020-03-26

Water Lite mobile-ready 1.71.7z

An advanced water system for Unity. Water+ is very fast and it is optimized to run on almost any hardware possible while looking amazing. This is a lite version of the full Water+ plugin. It has most of Water+ functionality, without the additional water map generation tools. Water+ lite shader has reflections, refractions, fast anisotropic specularity and animated caustics. It supports multiple animation types, including flow maps, directional and island-like animations. It's possible to create water surfaces of any color and for any weather type with Water+. Desktop version runs at 120+ FPS on mid-end GPUs. Mobile version runs at 35+ FPS on iPhone 3GS.

2020-03-26

Water Shader - Manga Style v1.1.rar

Water Shader is an animated water material. This package includes: - Shader/Material and texture - customizable material - landscape material with foam movement - demo scene - tesselated wave Made with Shader Forge

2020-03-26

Explosion_v1.unitypackage

Looking to boost your projects's special FX fidelity? Make it pop with iMG's Explosion FX package! Ten high quality animation texture sheets with alpha channel. Make your project stand out from the masses with stunning fire, smoke and explosion effects. 16 prefabs containing particle effects for easy to use out of the box results. A selection of over 40 high resolution source renderings including alpha channel to create your own effect textures from. Get it now, and save dozens of hours of rendering, compositing and particle fx setup. All assets are suitable to work in 2D and 3D environments.

2020-03-26

Falling_Dust.rar

烟雾特效,可以做房屋倒塌的效果,里面由现成的案例作为参考,这个完全是一个特效,当然自己可以调整其效果,最重要的是做VR项目的话,我觉得还是可以的,完全做成那种效果

2020-03-26

Explosive Realistic VFX Texture Pack v1.unitypackage

Explosive Realistic VFX Texture Pack v1是一套完整的最重要的爆炸和火焰纹理包,用于逼真的游戏。 内容: 10个精灵表动画 两个失真纹理+着色器 一个平铺的示踪表 一个发光纹理 示例效果 精灵表动画包括:爆炸,火灾,火球,火冲击波,烟雾冲击波,烟雾痕迹,正常烟雾和余烬。 该软件包主要由精灵表组成 – 大多数效果的基本组件,使用这些精灵表创建自己的粒子效果,适合自己的游戏,在渲染效果以获得最佳效果时,使用HDR发光非常重要。 为每个纹理提供了一个示例效果 – 加上几个更大的组合效果示例,更大的例子是核弹,火焰喷射器,流星撞击,弹跳火球,快速射击武器和大火。

2020-03-26

Camera Filter Pack 3.6.3.unitypackage

Unity3D Camera Filter Pack超过310个相当好的过滤器!Unity3D Camera Filter Pack为您提供最佳的高品质全屏后处理效果,以增强和提高游戏质量,所有的过滤器都经过优化和调整,添加并打开令人敬畏的下一代过滤器到您的相机!

2020-03-26

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除