2
0
Fork 0

弹墙特效

master
cd 2 years ago
parent 143323f765
commit eb6b465126

@ -101,7 +101,7 @@ Material:
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
- _ScreenSize: {r: 1097, g: 590, b: 0, a: 0}
- _ScreenSize: {r: 1920, g: 1080, b: 0, a: 0}
- _Vec4: {r: 0, g: 0, b: 0, a: 0}
- _Wave1: {r: 1369.9567, g: 585.8363, b: 100, a: 1.0127399}
m_BuildTextureStacks: []

@ -162,7 +162,7 @@ public class MoveSystem : IExecuteSystem, IInitializeSystem
}
//撞墙反弹特效
Util.CastWallStaticEffect(GameConst.EffectHitGround1, entity.ID(), move.CrashWallPosition,
Util.CastWallStaticEffect(GameConst.EffectHitWall1, entity.ID(), move.CrashWallPosition,
move.CrashWallNormal);
//卡帧
Util.EntityPause(entity, 0.05f);
@ -174,7 +174,7 @@ public class MoveSystem : IExecuteSystem, IInitializeSystem
//撞墙反弹-小
move.Velocity = new Vector3(-move.Velocity.x, move.Velocity.y, -move.Velocity.z);
//撞墙特效
Util.CastWallStaticEffect(GameConst.EffectHitGround1, entity.ID(), move.CrashWallPosition,
Util.CastWallStaticEffect(GameConst.EffectHitWall2, entity.ID(), move.CrashWallPosition,
move.CrashWallNormal);
//缩放
Util.EntityScale(entity, Vector3.up * 3);

@ -214,7 +214,7 @@ namespace Game
{
// 忽略normal的y轴 保证特效垂直于墙面
normal.y = 0;
var rot = Vector3.Angle(Vector3.up, normal);
var rot = Util.Vec3ToRot(normal);
CastEffect(effectId, pos, rot, targetEntity, 0, false);
}

@ -26,6 +26,8 @@ namespace Game
public const string EffectHit = "effect_hit01"; // 默认受击
public const string EffectHitGround1 = "effect_hit_ground01"; // 默认地面受击1
public const string EffectHitGround2 = "effect_hit_ground02"; // 默认地面受击2
public const string EffectHitWall1 = "effect_hit_wall01"; // 默认墙面受击1
public const string EffectHitWall2 = "effect_hit_wall02"; // 默认墙面受击2
public const string EffectHitShield = "effect_hit_shield01"; // 默认护盾受击
public const string EffectHitShieldBreak = "effect_hit_shield_break01"; // 默认护盾击破
public const string EffectHitKill = "effect_hit_kill01"; // 默认击杀

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 843d8523135f41b43ab8a83726fdfe42
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 255899f1c186b6a48bd733298beeaeed
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: de34a4881dd365848913cce701c14de4
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -5,12 +5,19 @@ using UnityEngine.Playables;
[Serializable]
public class EffectInfo
{
[Rename("特效资源")]
public GameObject Effect;
[Rename("是否跟随实体")]
public bool isAttach;
[Rename("是否忽略速度缩放")]
public bool isSpeedIgnore;
[Rename("是否在地面释放")]
public bool isGround;
[Rename("额外偏移")]
public Vector3 offset;
[Rename("额外旋转")]
public float rotAdd;
[Rename("额外随机旋转")]
public float rotAddRandom;
}
[Serializable]

Loading…
Cancel
Save