public override void GetDeadAnimation() { if (!CheckState("Dead")) { CurAnimator.SetBool("BDead", true); } }
//触发跳跃躲闪动作 public override void GetJumpAnimation() { if (CurAnimator.GetBool("Move")) { if (_player.Controller.BJump) { if (!_player.CameraControl.LockState) { CurAnimator.SetTrigger("Jump"); } else { if (CheckState("EqipMove")) { CurAnimator.SetTrigger("Dodge_Roll"); } } } else if (_player.Controller.BStep) { if (_player.CameraControl.LockState) { if (CheckState("EqipMove")) { CurAnimator.SetTrigger("Dodge_Step"); } } } } }
public override void SetBlockAnimation() { //只有在IDLE状态下才能防御 if (CheckState("EqipMove")) { //根据防御键状态来判定是否触发防御动画 CurAnimator.SetBool("Block", _player.Controller.BDefense); //按下防御键权重插值到1 if (_player.Controller.BDefense) { SetAnimLayerWeight("Defense", 1, 0.2f); } //松开防御键权重插值回0 else { SetAnimLayerWeight("Defense", 0, 0.2f); } } //其他动画状态权重都会拉回0 else { //权重插值回0 SetAnimLayerWeight("Defense", 0, 0.3f); } }
public override void GetDamageAnimation(float x, float z) { if (!CheckState("DamageDirc")) { CurAnimator.SetFloat("AtkDircX", x); CurAnimator.SetFloat("AtkDircZ", z); CurAnimator.SetTrigger("UnderAttack"); } }
public override void ChangeActionState() { if (_player.Controller.GetSelect1()) { if (CheckState("UneqipMove")) { CurAnimator.SetTrigger("ToEqip"); CurAnimator.SetBool("B_Eqip", true); } else if (CheckState("EqipMove")) { CurAnimator.SetTrigger("ToUnEqip"); CurAnimator.SetBool("B_Eqip", false); } } }