|
@@ -37,6 +37,7 @@ public class PlayerController : MoveCharacter
|
|
|
public Collider soulCollector;
|
|
public Collider soulCollector;
|
|
|
public SkeletonMecanim skeletonMecanim;
|
|
public SkeletonMecanim skeletonMecanim;
|
|
|
private SpiritSystem spiritSystem;
|
|
private SpiritSystem spiritSystem;
|
|
|
|
|
+ private ScreenShake ss;
|
|
|
|
|
|
|
|
[Header("血量")]
|
|
[Header("血量")]
|
|
|
private int curHp;
|
|
private int curHp;
|
|
@@ -132,9 +133,6 @@ public class PlayerController : MoveCharacter
|
|
|
public float reviveTime; //复活时间
|
|
public float reviveTime; //复活时间
|
|
|
public float totalReviveTime;
|
|
public float totalReviveTime;
|
|
|
|
|
|
|
|
- [Header("玩家是否在基地")]
|
|
|
|
|
- public bool isBaseBtnOut = false;
|
|
|
|
|
-
|
|
|
|
|
[Header("八卦")]
|
|
[Header("八卦")]
|
|
|
public ChooseYinYang chooseYinYang;
|
|
public ChooseYinYang chooseYinYang;
|
|
|
|
|
|
|
@@ -385,6 +383,7 @@ public class PlayerController : MoveCharacter
|
|
|
{
|
|
{
|
|
|
base.Awake();
|
|
base.Awake();
|
|
|
PlayerInput playerInput = transform.GetComponent<PlayerInput>();
|
|
PlayerInput playerInput = transform.GetComponent<PlayerInput>();
|
|
|
|
|
+ ss = Camera.main.GetComponentInParent<ScreenShake>();
|
|
|
spirits = GetComponent<Spirits>();
|
|
spirits = GetComponent<Spirits>();
|
|
|
playerId = playerInput.playerIndex;
|
|
playerId = playerInput.playerIndex;
|
|
|
transform.position = new Vector3(pos.x, pos.y, 0);
|
|
transform.position = new Vector3(pos.x, pos.y, 0);
|
|
@@ -1613,7 +1612,6 @@ public class PlayerController : MoveCharacter
|
|
|
public void PlayerRevive()
|
|
public void PlayerRevive()
|
|
|
{
|
|
{
|
|
|
isRevive = false;
|
|
isRevive = false;
|
|
|
- isBaseBtnOut = false;
|
|
|
|
|
bodyTrans.gameObject.SetActive(true);
|
|
bodyTrans.gameObject.SetActive(true);
|
|
|
uiHp.transform.parent.gameObject.SetActive(true);
|
|
uiHp.transform.parent.gameObject.SetActive(true);
|
|
|
rb.constraints = RigidbodyConstraints.FreezePositionZ | RigidbodyConstraints.FreezeRotation;
|
|
rb.constraints = RigidbodyConstraints.FreezePositionZ | RigidbodyConstraints.FreezeRotation;
|
|
@@ -2036,4 +2034,34 @@ public class PlayerController : MoveCharacter
|
|
|
{
|
|
{
|
|
|
targetCharacter = searchTrigger.GetMinDisTarget(attackController.targetTypes, attackController.canHitFly);
|
|
targetCharacter = searchTrigger.GetMinDisTarget(attackController.targetTypes, attackController.canHitFly);
|
|
|
}*/
|
|
}*/
|
|
|
|
|
+
|
|
|
|
|
+ public override void BeHit(int damage)
|
|
|
|
|
+ {
|
|
|
|
|
+ base.BeHit(damage);
|
|
|
|
|
+ //屏幕红闪+抖动
|
|
|
|
|
+ if (ss == null)
|
|
|
|
|
+ {
|
|
|
|
|
+ ss = Camera.main.GetComponentInParent<ScreenShake>();
|
|
|
|
|
+ }
|
|
|
|
|
+ ss.enabled = true;
|
|
|
|
|
+ if (isSustainedInjury || damage >= heavyDamage)
|
|
|
|
|
+ {
|
|
|
|
|
+ ss.HeavyShakeShine();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public override void BeHit(AttackInfo attackInfo, float dir)
|
|
|
|
|
+ {
|
|
|
|
|
+ base.BeHit(attackInfo, dir);
|
|
|
|
|
+ //屏幕红闪+抖动
|
|
|
|
|
+ if (ss == null)
|
|
|
|
|
+ {
|
|
|
|
|
+ ss = Camera.main.GetComponentInParent<ScreenShake>();
|
|
|
|
|
+ }
|
|
|
|
|
+ ss.enabled = true;
|
|
|
|
|
+ if (isSustainedInjury || attackInfo.damage >= heavyDamage)
|
|
|
|
|
+ {
|
|
|
|
|
+ ss.HeavyShakeShine();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|