private void Update() { // 玩家输入指令更新 command.CommandSystem(); if (playerPause.isPaused) { return; } // 更新碰撞相关的状态变量 colliderChecker.ColliderCheckerSystem(); // 更新卡bug探测器 bugColliderChecker.BugColliderCheckerSystem(); // 跳跃(不在冲刺、攀墙状态时可进行),且方向键无向下输入 if (!climb.isSlidingOrClimbing && !dashing.isDashing) { jump.JumpSystem(); } // 行走(不在冲刺、攀墙状态时可进行) if (!climb.isSlidingOrClimbing && !dashing.isDashing) { walk.WalkSystem(); } // 更新玩家朝向(不在冲刺、攀墙状态下可进行) if (!climb.isSlidingOrClimbing && !dashing.isDashing) { face.FaceSystem(); } // 蹬墙跳 jumpOnWall.JumpOnWallSystem(); // 攀爬(包括下滑) if (!dashing.isDashing) { climb.ClimbSystem(); } // 恢复攀爬时间 climb.ResumeClimbTimeSystem(); // 攀爬特效(在下滑状态下可进行) if (climb.isSliding) { climbEffect.ClimbEffectSystem(); } // 攀爬条的更新 climbTimeBar.ClimbTimeBarSystem(); // 触发冲刺 dash.TriggerDashSystem(); // 冲刺进行时 if (dashing.isDashing) { dashing.DashingSystem(); } // 恢复可冲刺次数(不在冲刺状态下可进行) if (!dashing.isDashing) { dashCount.ResumeDashCountSystem(); } // 玩家动画更新 playerAnimator.PlayerAnimatorSystem(); // 脚底灰尘特效 if (!climb.isClimbing) { footDust.FootDustSystem(); } // 更新玩家头发颜色 hairFlow.HairColorSystem(); // 重力特效(不在爬墙、冲刺状态下可进行) if (!climb.isClimbing && !dashing.isDashing) { gravity.GravitySystem(); } // 水平速度控制(不在冲刺状态下可进行) if (!dashing.isDashing) { hSpeedUp.HSpeedUpSystem(); } // 触发玩家死亡系统 death.DeathSystem(); // 抓取系统 grabMovePlatform.GrabMovePlatformSystem(); platformCollider.PlatformColliderSystem(); }