diff --git a/logic/GameClass/GameObj/Bullet/Bullet.cs b/logic/GameClass/GameObj/Bullet/Bullet.cs index fa25353..b7c20a9 100644 --- a/logic/GameClass/GameObj/Bullet/Bullet.cs +++ b/logic/GameClass/GameObj/Bullet/Bullet.cs @@ -14,7 +14,7 @@ namespace GameClass.GameObj protected int ap; public int AP { - get => Interlocked.CompareExchange(ref ap, 0, 1); + get => Interlocked.CompareExchange(ref ap, 0, 0); } public void AddAP(int addAp) { diff --git a/logic/GameClass/GameObj/Moveable.cs b/logic/GameClass/GameObj/Moveable.cs index 7f9c74f..21bf524 100644 --- a/logic/GameClass/GameObj/Moveable.cs +++ b/logic/GameClass/GameObj/Moveable.cs @@ -50,7 +50,7 @@ namespace GameClass.GameObj private int isMoving = 0; public int IsMoving { - get => Interlocked.CompareExchange(ref isMoving, 0, 1); + get => Interlocked.CompareExchange(ref isMoving, 0, 0); set => Interlocked.Exchange(ref isMoving, value); } @@ -157,7 +157,7 @@ namespace GameClass.GameObj /// public int MoveSpeed { - get => Interlocked.CompareExchange(ref moveSpeed, 0, 1); + get => Interlocked.CompareExchange(ref moveSpeed, 0, 0); set => Interlocked.Exchange(ref moveSpeed, value); } /// diff --git a/logic/Preparation/Interface/ISkill.cs b/logic/Preparation/Interface/ISkill.cs index 93aa459..72a1cba 100644 --- a/logic/Preparation/Interface/ISkill.cs +++ b/logic/Preparation/Interface/ISkill.cs @@ -34,7 +34,7 @@ namespace Preparation.Interface { get { - return Interlocked.CompareExchange(ref timeUntilActiveSkillAvailable, 0, 1); + return Interlocked.CompareExchange(ref timeUntilActiveSkillAvailable, 0, 0); } set { @@ -47,7 +47,7 @@ namespace Preparation.Interface public int isBeingUsed = 0;//实为bool public int IsBeingUsed { - get => Interlocked.CompareExchange(ref isBeingUsed, 0, 1); + get => Interlocked.CompareExchange(ref isBeingUsed, 0, 0); set => Interlocked.Exchange(ref isBeingUsed, value); } } @@ -169,7 +169,7 @@ namespace Preparation.Interface private int degreeOfMeditation = 0; public int DegreeOfMeditation { - get => Interlocked.CompareExchange(ref degreeOfMeditation, 0, 1); + get => Interlocked.CompareExchange(ref degreeOfMeditation, 0, 0); set => Interlocked.Exchange(ref degreeOfMeditation, value); } }