コード例 #1
0
 private void UpdateWeaponAnimation(IAdaptiveContainer <IFsmInputCommand> commandsContainer,
                                    PlayerEntity playerEntity)
 {
     try
     {
         SingletonManager.Get <DurationHelp>().ProfileStart(CustomProfilerStep.StateUpdateWeaponAnimation);
         // 更新武器动画
         _weaponAnim.FromAvatarAnimToWeaponAnimProgress(commandsContainer,
                                                        playerEntity.appearanceInterface.Appearance.GetWeaponP1InHand(),
                                                        playerEntity.appearanceInterface.Appearance.GetWeaponP3InHand(),
                                                        playerEntity.networkWeaponAnimation);
         _weaponAnim.FromWeaponAnimProgressToWeaponAnim(
             playerEntity.appearanceInterface.Appearance.GetWeaponP1InHand(),
             playerEntity.appearanceInterface.Appearance.GetWeaponP3InHand(),
             playerEntity.networkWeaponAnimation);
         // 武器动画结束
         _weaponAnim.WeaponAnimFinishedUpdate(commandsContainer,
                                              playerEntity.appearanceInterface.Appearance.GetWeaponP1InHand(),
                                              playerEntity.appearanceInterface.Appearance.GetWeaponP3InHand(),
                                              playerEntity.networkWeaponAnimation);
     }
     finally
     {
         SingletonManager.Get <DurationHelp>().ProfileEnd(CustomProfilerStep.StateUpdateWeaponAnimation);
     }
 }