|
@@ -4,9 +4,16 @@ using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
|
using UnityEngine;
|
|
using UnityEngine;
|
|
|
using TMPro;
|
|
using TMPro;
|
|
|
|
|
+using Sirenix.OdinInspector;
|
|
|
|
|
|
|
|
public class MoveCharacter : Character
|
|
public class MoveCharacter : Character
|
|
|
{
|
|
{
|
|
|
|
|
+ [FoldoutGroup("组件")]
|
|
|
|
|
+ public Foot foot;
|
|
|
|
|
+ [HideInInspector] public AttributeStatus attributeStatus;
|
|
|
|
|
+ private ScreenReflectPresets screenReflectPresets;
|
|
|
|
|
+ private HitFeedbackSystem hitFeedbackSystem;
|
|
|
|
|
+
|
|
|
[Header("角色抗击打值")]
|
|
[Header("角色抗击打值")]
|
|
|
public int hitResistance;
|
|
public int hitResistance;
|
|
|
|
|
|
|
@@ -18,10 +25,6 @@ public class MoveCharacter : Character
|
|
|
public Material[] outlineMats;
|
|
public Material[] outlineMats;
|
|
|
public Material[] outline1Mats;
|
|
public Material[] outline1Mats;
|
|
|
|
|
|
|
|
- [Header("组件")]
|
|
|
|
|
- public Foot foot;
|
|
|
|
|
- [HideInInspector]public AttributeStatus attributeStatus;
|
|
|
|
|
-
|
|
|
|
|
[Header("额外重力")]
|
|
[Header("额外重力")]
|
|
|
public float extraRiseGravity = 0; //上升时额外重力加速度
|
|
public float extraRiseGravity = 0; //上升时额外重力加速度
|
|
|
public float extraFallGravity = -10; //下落时额外重力加速度
|
|
public float extraFallGravity = -10; //下落时额外重力加速度
|
|
@@ -29,12 +32,11 @@ public class MoveCharacter : Character
|
|
|
[Header("属性")]
|
|
[Header("属性")]
|
|
|
public float moveSpeed = 5;
|
|
public float moveSpeed = 5;
|
|
|
public bool needToAdjustFlyHeight;
|
|
public bool needToAdjustFlyHeight;
|
|
|
- [DisplayOnly]
|
|
|
|
|
- public float flyHeight;
|
|
|
|
|
- public float maxFlyHeight;
|
|
|
|
|
- public float minFlyHeight;
|
|
|
|
|
|
|
+ [FoldoutGroup("回升")][DisplayOnly] public float flyHeight;
|
|
|
|
|
+ [FoldoutGroup("回升")][LabelText("最大高度")] public float maxFlyHeight;
|
|
|
|
|
+ [FoldoutGroup("回升")][LabelText("最低高度")] public float minFlyHeight;
|
|
|
float refspeed = 1;
|
|
float refspeed = 1;
|
|
|
- public float flyUpTime;
|
|
|
|
|
|
|
+ [FoldoutGroup("回升")][LabelText("消耗时间")] public float flyUpTime;
|
|
|
[HideInInspector]
|
|
[HideInInspector]
|
|
|
public int isAdjustHeight;
|
|
public int isAdjustHeight;
|
|
|
|
|
|
|
@@ -80,6 +82,7 @@ public class MoveCharacter : Character
|
|
|
mesh = spinee.GetComponent<MeshRenderer>();
|
|
mesh = spinee.GetComponent<MeshRenderer>();
|
|
|
mats = mesh.materials;
|
|
mats = mesh.materials;
|
|
|
attributeStatus = GetComponentInChildren<AttributeStatus>();
|
|
attributeStatus = GetComponentInChildren<AttributeStatus>();
|
|
|
|
|
+ screenReflectPresets = Camera.main.GetComponentInParent<ScreenReflectPresets>();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void Start()
|
|
private void Start()
|
|
@@ -214,6 +217,7 @@ public class MoveCharacter : Character
|
|
|
//造成伤害附加其他效果
|
|
//造成伤害附加其他效果
|
|
|
public override void BeHit(AttackInfo attackInfo, Character attackFrom)
|
|
public override void BeHit(AttackInfo attackInfo, Character attackFrom)
|
|
|
{
|
|
{
|
|
|
|
|
+ screenReflectPresets.ScreenReflect(hitFeedbackSystem, attackFrom.attackController.attackValue - hitResistance);
|
|
|
base.BeHit(attackInfo, attackFrom);
|
|
base.BeHit(attackInfo, attackFrom);
|
|
|
int damage = attackInfo.damage;
|
|
int damage = attackInfo.damage;
|
|
|
if (attackInfo.attackEffect.Length > 0)
|
|
if (attackInfo.attackEffect.Length > 0)
|