From 6a9c2bc48bd2f00ab149ca0d0209fd3d0bef81a9 Mon Sep 17 00:00:00 2001 From: shangfengh <3495281661@qq.com> Date: Thu, 27 Apr 2023 00:30:03 +0800 Subject: [PATCH] style: :art: format --- CAPI/cpp/API/include/constants.h | 28 ++++++++++++++-------------- CAPI/cpp/API/src/AI.cpp | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CAPI/cpp/API/include/constants.h b/CAPI/cpp/API/include/constants.h index 19b8331..d9407dd 100644 --- a/CAPI/cpp/API/include/constants.h +++ b/CAPI/cpp/API/include/constants.h @@ -313,48 +313,48 @@ namespace Constants SCCI bool IsRemoteAttack = false; SCCI int CastTime = (int)BulletAttackRange * 1000 / Speed; - SCCI int Backswing =basicBackswing; - SCCI int RecoveryFromHit =basicRecoveryFromHit; + SCCI int Backswing = basicBackswing; + SCCI int RecoveryFromHit = basicRecoveryFromHit; SCCI int cd = basicBackswing; SCCI int maxBulletNum = 1; }; - + struct FlyingKnife { SCCI double BulletBombRange = 0; SCCI double BulletAttackRange = basicRemoteAttackRange * 13; - SCCI int ap = basicApOfTricker* 4 / 5; - SCCI int Speed = basicBulletMoveSpeed* 25 / 10; + SCCI int ap = basicApOfTricker * 4 / 5; + SCCI int Speed = basicBulletMoveSpeed * 25 / 10; SCCI bool IsRemoteAttack = true; SCCI int CastTime = basicCastTime * 4 / 5; - SCCI int Backswing =0; - SCCI int RecoveryFromHit =0; + SCCI int Backswing = 0; + SCCI int RecoveryFromHit = 0; SCCI int cd = basicBackswing / 2; SCCI int maxBulletNum = 1; }; - + struct BombBomb { SCCI double BulletBombRange = basicBulletBombRange; SCCI double BulletAttackRange = basicAttackShortRange; SCCI int ap = basicApOfTricker * 6 / 5; - SCCI int Speed = basicBulletMoveSpeed* 30 / 37; + SCCI int Speed = basicBulletMoveSpeed * 30 / 37; SCCI bool IsRemoteAttack = false; SCCI int CastTime = (int)BulletAttackRange * 1000 / Speed; - SCCI int Backswing =basicRecoveryFromHit; - SCCI int RecoveryFromHit =basicRecoveryFromHit; + SCCI int Backswing = basicRecoveryFromHit; + SCCI int RecoveryFromHit = basicRecoveryFromHit; SCCI int cd = basicCD; SCCI int maxBulletNum = 1; }; - + struct JumpyDumpty { SCCI double BulletBombRange = basicBulletBombRange / 2; SCCI double BulletAttackRange = basicRemoteAttackRange * 2; - SCCI int ap = (int)(basicApOfTricker* 0.6); - SCCI int Speed = basicBulletMoveSpeed* 43 / 37; + SCCI int ap = (int)(basicApOfTricker * 0.6); + SCCI int Speed = basicBulletMoveSpeed * 43 / 37; SCCI bool IsRemoteAttack = false; }; } // namespace Constants diff --git a/CAPI/cpp/API/src/AI.cpp b/CAPI/cpp/API/src/AI.cpp index 19b8208..6895409 100644 --- a/CAPI/cpp/API/src/AI.cpp +++ b/CAPI/cpp/API/src/AI.cpp @@ -20,7 +20,7 @@ extern const THUAI6::TrickerType trickerType = THUAI6::TrickerType::Assassin; // 可以在AI.cpp内部声明变量与函数 -void AI::play(IStudentAPI& api)//每帧执行一次AI::play(IStudentAPI& api)或AI::play(ITrickerAPI& api)(除非执行该函数超过一帧50ms),获取的信息都是这一帧的开始的状态 +void AI::play(IStudentAPI& api) // 每帧执行一次AI::play(IStudentAPI& api)或AI::play(ITrickerAPI& api)(除非执行该函数超过一帧50ms),获取的信息都是这一帧的开始的状态 { // 公共操作 if (this->playerID == 0)