From 1fbb0ac0b6125d2f54f1cd84f49b949f7140f121 Mon Sep 17 00:00:00 2001 From: Henry <2280825018@qq.com> Date: Sat, 23 Nov 2024 19:35:41 +0800 Subject: [PATCH] style: StyleChange --- logic/Gaming/CharacterManager.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/logic/Gaming/CharacterManager.cs b/logic/Gaming/CharacterManager.cs index e9147f1..a949743 100644 --- a/logic/Gaming/CharacterManager.cs +++ b/logic/Gaming/CharacterManager.cs @@ -14,7 +14,7 @@ private class CharacterManager(Game game, Map gameMap) { private readonly Game game = game; private readonly Map map = gameMap; - public static Character?AddCharacter(long teamID,long playerID,CharacterType charactertype,MoneyPool moneypool) + public static Character? AddCharacter(long teamID, long playerID, CharacterType charactertype, MoneyPool moneypool) { Character newcharacter = new(GameData.CharacterRadius, charactertype, moneypool); newcharacter.TeamID.SetROri(teamID); @@ -34,14 +34,14 @@ public bool ActivateCharacter(Character character, XY pos) return true; } - public void BeAttacked(Character character,Character obj) + public void BeAttacked(Character character, Character obj) { - if(obj.TeamID.Get()==character.TeamID.Get()) + if (obj.TeamID.Get() == character.TeamID.Get()) { return; } long subHP = obj.AttackPower; - if(character.Shield>0) + if (character.Shield > 0) { character.Shield.SubPositiveV(subHP); } @@ -49,7 +49,7 @@ public void BeAttacked(Character character,Character obj) { character.HP.SubPositiveV(subHP); } - if(character.HP==0) + if (character.HP == 0) { long score = 0; if (character.CharacterType == CharacterType.TangSeng || character.CharacterType == CharacterType.JiuLing) @@ -63,7 +63,7 @@ public void BeAttacked(Character character,Character obj) } } - public void BeAttacked(Character character,long AP)//此部分适用于中立资源攻击及技能攻击 + public void BeAttacked(Character character, long AP)//此部分适用于中立资源攻击及技能攻击 { if (character.Shield > 0) { @@ -87,7 +87,7 @@ public void BeAttacked(Character character,long AP)//此部分适用于中立资 } } - public static bool Recover(Character character,long recover) + public static bool Recover(Character character, long recover) { if (recover <= 0) return false; @@ -97,13 +97,12 @@ public static bool Recover(Character character,long recover) public void Remove(Character character) { - if(!character.TryToRemoveFromGame(CharacterState.DECEASED)) + if (!character.TryToRemoveFromGame(CharacterState.DECEASED)) { return; } gameMap.Remove(character); } } - } }